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 custom the value of search input? #196

Open
tainv1101 opened this issue Sep 12, 2023 · 0 comments
Open

How can I custom the value of search input? #196

tainv1101 opened this issue Sep 12, 2023 · 0 comments

Comments

@tainv1101
Copy link

tainv1101 commented Sep 12, 2023

The library so grate but how can I custom the value of search input, because I'm from Vietnamese and when I search get unexpected result.
Example: I have 2 folders with the name: "Bông" and "Bong".
I expect when search with "bo" it will show 2 above folders, but I just get 1 folder is "Bong".
The code of my logic to change the value when enter the search input likely:
const removeAccents = (str: string) => {
return str
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/đ/g, "d")
.replace(/Đ/g, "D");
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant