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

Filtering show countries without translation #480

Open
cbarceloc opened this issue Jul 5, 2022 · 2 comments
Open

Filtering show countries without translation #480

cbarceloc opened this issue Jul 5, 2022 · 2 comments

Comments

@cbarceloc
Copy link

cbarceloc commented Jul 5, 2022

The countries list show correct translations, but when we write some text in the search box, the list shown is always in english

@Poli97
Copy link

Poli97 commented Jan 13, 2023

Any update on this one? Basically the initial list is presented with the correct translation, but as soon as you start typing in the search filter, the filtered results are shown in default english

@9christian9
Copy link

Ciao @cbarceloc , @Poli97 , and everyone,

I ran into the same problem as you and tried to solve it,

The problem in my opinion:
The problem could be data: search(filter, data) from /lib/CountryList.js, more precisely the problem could be search from useContext().
When trying to do a search, search(filter, data) returns data with the old translation option. If you debug filter and data in /lib/CountryList.js, the variables are set correctly, but when you activate the search function, an old data is passed back.

The solution
I created a repo that with a js script solves the problem before building the app
https://github.com/9christian9/FIX-react-native-country-picker-modal-filtering-countries-with-old-translation

I hope this will help.
With ♥ by Christian

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

3 participants