components icon indicating copy to clipboard operation
components copied to clipboard

[Feature Request]: Property filter: deburr when matching substring

Open zeSKB opened this issue 1 year ago • 3 comments

Description

It is quite common in Europe to write in latin letters without using special characters. Currently property filter does not seem to match (and show) "Müller" as an option when searching for "Muller".

Would deburring be a possibility? Looking around in code it seems Autosuggest that is used by PropertyFilter uses string.indexOf() when trying to display matches, which is only good if you can type the needed special characters.

Code of Conduct

zeSKB avatar Jun 22 '23 10:06 zeSKB

Hi, thank you for reaching out. We will discuss this request in the team and get back to you.

connorlanigan avatar Jun 23 '23 14:06 connorlanigan

Any news?

I've managed to cover my use case by using this in matchSingleOption:

const matchWithoutDiacritics = (value: string | undefined, searchText: string) => {
  return (
    value
      ?.toLowerCase()
      .normalize('NFKD')
      .replace(/\p{Diacritic}/gu, '')
      .indexOf(searchText) !== -1
  );
};

Highlighting doesn't work but at least options with special chars show up in the options list. However, if I run quick-build and try to use assets from 'lib/components' the application looks nowhere near close to what's on https://cloudscape.design/ 😕

zeSKB avatar Jun 27 '23 13:06 zeSKB

Hi, we've discussed this feature request in the team, and agreed that this feature could be a reasonable addition to the Cloudscape design system. While we cannot commit to a timeline for the implementation, we will keep this GitHub issue updated when we have any news.

For the build issue you're encountering, please try performing a full build (npm run build) instead of a quick build, and open a bug report if the issue persists.

connorlanigan avatar Jul 03 '23 11:07 connorlanigan

Closing due to inactivity. Feel free to reopen if you want to resume the contribution.

just-boris avatar Mar 04 '24 13:03 just-boris