components
components copied to clipboard
[Feature Request]: Property filter: deburr when matching substring
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
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate requests
Hi, thank you for reaching out. We will discuss this request in the team and get back to you.
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/ 😕
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.
Closing due to inactivity. Feel free to reopen if you want to resume the contribution.