fix: filter state option order (#4284)

This commit is contained in:
Anmol Singh Bhatia 2024-04-26 12:57:36 +05:30 committed by GitHub
parent 15c7deb2db
commit 42cceb5e65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ export const FilterState: React.FC<Props> = observer((props) => {
const sortedOptions = useMemo(() => {
const filteredOptions = (states ?? []).filter((s) => s.name.toLowerCase().includes(searchQuery.toLowerCase()));
return sortBy(filteredOptions, [(s) => !(appliedFilters ?? []).includes(s.id), (s) => s.name.toLowerCase()]);
return sortBy(filteredOptions, [(s) => !(appliedFilters ?? []).includes(s.id)]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchQuery]);