feat: trim for aplhabet sort

This commit is contained in:
2026-04-06 13:23:25 +03:00
parent a58f438dce
commit 4b02c6e9d3
25 changed files with 73 additions and 59 deletions

View File

@@ -74,7 +74,7 @@ export const CountryListPage = observer(() => {
];
const rows = useMemo(() => {
const query = searchQuery.toLowerCase();
const query = searchQuery.trim().toLowerCase();
return (countries[language]?.data ?? [])
.filter((country) => !query || (country.name ?? "").toLowerCase().includes(query))
.map((country) => ({