Description
When searching within several client-side search/autocomplete fields, accents/diacritics are not ignored. For example, searching "alamos" does not return a location named "Álamos", even though they should match.
This was first noticed when creating a work request and searching within the location field, but the same root cause affects several other inputs.
Steps to reproduce
- Have a location named e.g. "Álamos"
- Go to create a new work request
- In the location field, type "alamo" (without the accent)
- No results are returned
Root cause
Filtering happens entirely client-side in these places, matching with plain .toLowerCase().includes() and no diacritic normalization:
const inputValue = params.inputValue.toLowerCase();
const optionLabel = option.label.toLowerCase();
return optionLabel.includes(inputValue);
Affected fields
-
frontend/src/content/own/components/form/CustomSelect2.tsx — 4 occurrences of this same pattern, for: location/parentLocation, asset, user, and category autocompletes (used across work order/request/asset forms, etc.)
-
frontend/src/content/own/components/form/RequestPortalPreview.tsx (~line 222) — location/asset search inside the public Request Portal form (used by external/customer users to submit requests). Likely the highest-impact one, since external users are the least likely to type accents.
-
frontend/src/content/own/components/form/SelectParts.tsx (~line 119) — parts search box when assigning parts to a work order.
-
frontend/src/content/own/components/TableCustomized.tsx (~line 108) — generic table search filter. Doesn't appear to be imported/used anywhere currently, but carries the same bug if it's picked up later.
Description
When searching within several client-side search/autocomplete fields, accents/diacritics are not ignored. For example, searching "alamos" does not return a location named "Álamos", even though they should match.
This was first noticed when creating a work request and searching within the location field, but the same root cause affects several other inputs.
Steps to reproduce
Root cause
Filtering happens entirely client-side in these places, matching with plain
.toLowerCase().includes()and no diacritic normalization:Affected fields
frontend/src/content/own/components/form/CustomSelect2.tsx— 4 occurrences of this same pattern, for: location/parentLocation, asset, user, and category autocompletes (used across work order/request/asset forms, etc.)frontend/src/content/own/components/form/RequestPortalPreview.tsx(~line 222) — location/asset search inside the public Request Portal form (used by external/customer users to submit requests). Likely the highest-impact one, since external users are the least likely to type accents.frontend/src/content/own/components/form/SelectParts.tsx(~line 119) — parts search box when assigning parts to a work order.frontend/src/content/own/components/TableCustomized.tsx(~line 108) — generic table search filter. Doesn't appear to be imported/used anywhere currently, but carries the same bug if it's picked up later.