Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i ignore in filter diacritics? For example Apă i want to filter Apa (in data grid pro) #9817

Closed
2 tasks done
bogdancbs opened this issue Jul 27, 2023 · 8 comments
Closed
2 tasks done
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: logic Logic customizability feature: Filtering Related to the data grid Filtering feature plan: Pro Impact at least one Pro user support: commercial Support request from paid users

Comments

@bogdancbs
Copy link

bogdancbs commented Jul 27, 2023

Order ID or Support key 💳 (optional)

68255

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

The problem in depth 🔍

I am using unstable_headerFilters i want to know if there are any props witch can ignore diacritics.
For example Apă i want to filter Apa: https://codesandbox.io/s/upbeat-wind-j6z8zc

Your environment 🌎

`npx @mui/envinfo`

System:
OS: Windows 10 10.0.22621
Binaries:
Node: 14.21.3 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 114.0.5735.248
Edge: Spartan (44.22621.2070.0), Chromium (115.0.1901.183)
npmPackages:
@emotion/react: ^11.10.6 => 11.11.1
@emotion/styled: ^11.10.6 => 11.11.0
@mui/base: 5.0.0-beta.4
@mui/core-downloads-tracker: 5.14.0
@mui/icons-material: ^5.11.11 => 5.13.7
@mui/lab: ^5.0.0-alpha.133 => 5.0.0-alpha.134
@mui/material: ^5.14.0 => 5.14.0
@mui/private-theming: 5.13.7
@mui/styled-engine: 5.13.2
@mui/styled-engine-sc: ^5.11.11 => 5.12.0
@mui/styles: ^5.14.1 => 5.14.1
@mui/system: 5.13.5
@mui/types: 7.2.4
@mui/utils: 5.13.1
@mui/x-data-grid: ^6.0.1 => 6.9.2
@mui/x-data-grid-pro: ^6.6.0 => 6.8.0
@mui/x-license-pro: 6.6.0
@types/react: 18.2.14
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
styled-components: ^5.3.9 => 5.3.11

@bogdancbs bogdancbs added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Jul 27, 2023
@bogdancbs bogdancbs changed the title [question] How can i ignore in filter diacritics? For example Apă i want to filter Apa (in data grid pro) How can i ignore in filter diacritics? For example Apă i want to filter Apa (in data grid pro) Jul 27, 2023
@zannager zannager added component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user labels Jul 28, 2023
@cherniavskii
Copy link
Member

Hi @bogdancbs
You can wrap built-in filter operators to achieve this behavior.
Here's a working demo: https://codesandbox.io/s/blissful-haibt-ptyrkx?file=/Demo.tsx
Is this what you are looking for?

@cherniavskii cherniavskii added status: waiting for author Issue with insufficient information feature: Filtering Related to the data grid Filtering feature customization: logic Logic customizability and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 28, 2023
@cherniavskii
Copy link
Member

We might want to provide this functionality out of the box (opt-in) since it might be a common requirement in some languages.

@bogdancbs
Copy link
Author

Great! thanks

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Jul 28, 2023
@bogdancbs
Copy link
Author

And if i want to filter table with diacritics? for example if i search "apă" no results returning, only for "apa"
It must work with or without diacritics

@cherniavskii
Copy link
Member

@bogdancbs Right, here's a fixed version: https://codesandbox.io/s/quirky-sinoussi-hn97wj?file=/Demo.tsx

@bogdancbs
Copy link
Author

great

@UmutKDev
Copy link

UmutKDev commented Aug 2, 2024

@cherniavskii not working in 7.x datagrid

@cherniavskii
Copy link
Member

@UmutKDev It seems to work in https://mui.com/x/react-data-grid/filtering/quick-filter/#ignore-diacritics-accents
Can you open an issue with a reproduction example? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: logic Logic customizability feature: Filtering Related to the data grid Filtering feature plan: Pro Impact at least one Pro user support: commercial Support request from paid users
Projects
None yet
Development

No branches or pull requests

4 participants