xcarpentier / react-native-country-picker-modal

🇦🇶 Country picker provides a modal allowing a user to select a country from a list. It display a flag next to each country name.
https://reactnative.gallery/xcarpentier/country-picker
MIT License
1.07k stars 795 forks source link

Filter applies to all countries (instead of only available countries) #479

Closed ahdam closed 2 years ago

ahdam commented 2 years ago

Issue Description

The search is done in all available countries. It should only be done in the provided countries.

Steps to Reproduce / Code Snippets

<CountryPicker
    countryCode: selectedCountry.cca2,
    withFilter: true,
    withFlag: true,
    preferredCountries:  ["RO", "IT"],
    countryCodes: ["RO", "IT"],
    withCallingCode: true,
    withEmoji: true,
    onSelect: onCountrySelect
/>

IMG_6659 IMG_6660

Expected Results

When I filter countries, I expect the filter to apply only to available countries. (Not all available countries)

Additional Information