Ensured tags, servers and domains search is case insensitive

This commit is contained in:
Alejandro Celaya
2022-08-07 13:26:26 +02:00
parent 4a92d0ff11
commit f69bda351d
6 changed files with 9 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ export const ManageServers = (
const allServers = Object.values(servers);
const [serversList, setServersList] = useState(allServers);
const filterServers = (searchTerm: string) => setServersList(
allServers.filter(({ name, url }) => `${name} ${url}`.match(searchTerm)),
allServers.filter(({ name, url }) => `${name} ${url}`.toLowerCase().match(searchTerm.toLowerCase())),
);
const hasAutoConnect = serversList.some(({ autoConnect }) => !!autoConnect);
const [errorImporting, setErrorImporting] = useTimeoutToggle(false, SHOW_IMPORT_MSG_TIME);