Skip to content

This repo fix the issue that during searching, the countries name are displayed whit old translation and not with the current

License

Notifications You must be signed in to change notification settings

9christian9/FIX-react-native-country-picker-modal-filtering-countries-with-old-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FIX-react-native-country-picker-modal-filtering-countries-with-old-translation

This repository solve the problem that during searching, the countries name are displayed whit old translation and not with the current.

Premise:

This issue is not reproducible in example of official package.

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.

I tried to fix the problem, but unfortunately I could not find any solution other than this.

How to use?

  1. Download the fix_React-Native-Country-Picker-Modal.js file and place it in the react native root project

now you have two way:

  1. In postinstall add NODE_PATH=. node ./fix_React-Native-Country-Picker-Modal.js

  2. Using patch-package

    • run node fix_React-Native-Country-Picker-Modal.js
    • run npx patch-package react-native-country-picker-modal
    • delete fix_React-Native-Country-Picker-Modal.js
    • add patch-package in postinstall

Examples

Example based on first way


.....

scripts {

"postinstall": "NODE_PATH=. node ./fix_React-Native-Country-Picker-Modal.js"

}

.....

  

Example based on second way


.....

scripts {

"postinstall": "patch-package"

}

.....

  

ko-fi

License

MIT

About

This repo fix the issue that during searching, the countries name are displayed whit old translation and not with the current

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published