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

Search ignoring character variations #359

Closed
wants to merge 1 commit into from
Closed

Search ignoring character variations #359

wants to merge 1 commit into from

Conversation

pedroseac
Copy link

@pedroseac pedroseac commented Aug 5, 2015

This change is Reviewable

@bruderstein
Copy link
Collaborator

I'm half torn between giving this the 👍 , and saying that if you want to do this, you should be using your own custom filterOptions function. I can see this would be something that would grow significantly (e.g. would be good to have umlauts in there, speaking from Germany 😄). I'd also make this optional, so add a prop to turn this on or off (e.g. ignoreAccentsInFilter={true}).

Note you don't need the | in a group, and you can chain the replacements, so this works fine

string = string.replace(/[áàâã]/gi, "a")
    .replace(/[éèê]/gi, "e")
    .replace(/[íìî]/gi, "i")
// etc

There is a suggestion from @brianreavis in #227 to use sifter.js for the filtering, which would solve this sort of thing nicely.

@pedroseac
Copy link
Author

sorry for the insanely delayed respose!

thanks for the comment and corrections @bruderstein! I gonna have a better look at it.

My thinking at the time was: "Google does like this, why not you?". Hahaha!

@pedroseac
Copy link
Author

@Lenne231
Copy link

Lenne231 commented Jun 22, 2016

Is there any progress on this? I would really like to use umlauts as well...

update: setting ignoreAccents to false solved my problem

@agirton
Copy link
Collaborator

agirton commented Jun 9, 2017

This has been resolved by using ignoreAccents prop and setting it to false.

@agirton agirton closed this Jun 9, 2017
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

Successfully merging this pull request may close these issues.

4 participants