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

Ignore accents in country names when using filter and spanish translation #493

Open
KevinBarrera opened this issue Nov 7, 2022 · 0 comments

Comments

@KevinBarrera
Copy link

Issue Description

While using react-native-country-picker-modal I found an issue while using withFilter and translation props.
As you might know there are some countries which names could include accent marks, among other punctuation marks, in some languages. The issue is that if I select spa -> for spanish translation and type something within filter input it doesn't match the input with the countries because inpute does not include accents but names do.
(i.e) Having this:

    <CountryPicker
      translation="spa"
      withFilter
      ...
    />

I got this behavior:

RPReplay_Final1667863955.mov

As you can see, if user types "M" "México" appears as one of possible options, but if I add an "e" -> "Me". "México" disappears from the list, I think it is because the accent, I've been looking for a way to get this ignoring the accent while filtering but cannot find the solution.

Steps to Reproduce / Code Snippets

  • Install "react-native-country-picker-modal": "^2.0.0"
  • Currently using Expo -> "expo": "^45.0.0",
  • Type script -> "typescript": "~4.3.5",

Expected Results

If user types "Me" "México" should appears within the options even if user does not type the accent when using "spanish" translation.

Additional Information

  • Nodejs version: 16.13.2
  • React version: 17.0.2
  • React Native version: 0.68.2
  • react-native-country-picker-modal version: 2.0.0
  • Platform(s) (iOS, Android, web, or all?): iOS and Android
  • TypeScript version: ~4.3.5
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