Skip to content

Search/autocomplete fields are not accent-insensitive (location, request portal, parts, table search) #290

Description

@eldoctormail

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

  1. Have a location named e.g. "Álamos"
  2. Go to create a new work request
  3. In the location field, type "alamo" (without the accent)
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions