From 6c6b40548f576bd87a0add8365afbd4a500a524b Mon Sep 17 00:00:00 2001 From: GyDi Date: Wed, 28 Sep 2022 14:15:22 +0800 Subject: [PATCH] fix: disable spell check --- src/pages/connections.tsx | 7 ++++--- src/pages/logs.tsx | 1 + src/pages/profiles.tsx | 1 + src/pages/rules.tsx | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/connections.tsx b/src/pages/connections.tsx index f85c54b..c43e8a7 100644 --- a/src/pages/connections.tsx +++ b/src/pages/connections.tsx @@ -44,12 +44,12 @@ const ConnectionsPage = () => { const filterConn = useMemo(() => { const orderFunc = orderOpts[curOrderOpt]; - const connetions = connData.connections.filter((conn) => + const connections = connData.connections.filter((conn) => (conn.metadata.host || conn.metadata.destinationIP)?.includes(filterText) ); - if (orderFunc) return orderFunc(connetions); - return connetions; + if (orderFunc) return orderFunc(connections); + return connections; }, [connData, filterText, curOrderOpt]); useEffect(() => { @@ -167,6 +167,7 @@ const ConnectionsPage = () => { fullWidth size="small" autoComplete="off" + spellCheck="false" variant="outlined" placeholder={t("Filter conditions")} value={filterText} diff --git a/src/pages/logs.tsx b/src/pages/logs.tsx index 54dd2b2..c13c19b 100644 --- a/src/pages/logs.tsx +++ b/src/pages/logs.tsx @@ -93,6 +93,7 @@ const LogPage = () => { fullWidth size="small" autoComplete="off" + spellCheck="false" variant="outlined" placeholder={t("Filter conditions")} value={filterText} diff --git a/src/pages/profiles.tsx b/src/pages/profiles.tsx index 6839103..241a497 100644 --- a/src/pages/profiles.tsx +++ b/src/pages/profiles.tsx @@ -149,6 +149,7 @@ const ProfilePage = () => { value={url} variant="outlined" autoComplete="off" + spellCheck="false" onChange={(e) => setUrl(e.target.value)} sx={{ input: { py: 0.65, px: 1.25 } }} placeholder={t("Profile URL")} diff --git a/src/pages/rules.tsx b/src/pages/rules.tsx index 6397d08..0bc0139 100644 --- a/src/pages/rules.tsx +++ b/src/pages/rules.tsx @@ -37,6 +37,7 @@ const RulesPage = () => { size="small" autoComplete="off" variant="outlined" + spellCheck="false" placeholder={t("Filter conditions")} value={filterText} onChange={(e) => setFilterText(e.target.value)}