Closed enesdumanli closed 3 years ago
If i understood you very well, the prop withCountryNameButton
makes you show the country name once it is selected other wise it will always show the string select country
and you can change that by passing the placeholder prop in CountryPicker (not mentioned in README).
Also dont forget to add the countryCode
prop in CountryPicker to show selected country other wise it will always show select country. Here is an example :
<CountryPicker
onSelect={(item) => setSelectedCountry(item)}
withModal
withCountryNameButton
visible={countryPickerVisible}
countryCode={selectedCountry.cca2}
placeholder="Your placeholder"
/>
thanks for your answer but its not working either. i want select country to doesnt show after i choose country. i want country name for example argentina instead of placeholder. withCountryNameButton should work but i have no idea why it doesnt work.
In the example you provided you are not passing countyCode prop, you should pass it like i mentioned in the example i provided in my last comment other wise the name of the country will not appear!
it worked after another try with your example. thank you so much.
<CountryPicker onSelect={(country) =>{}} countryCodes excludeCountries={ExcludeCountryCodeList} withCallingCode onClose={() =>{}} flatListProps={{ style: { marginHorizontal: 15 }, showsHorizontalScrollIndicator: false }} visible containerButtonStyle={{opacity: 0}} />
try this prop @enesdumanli
Issue Description
Select country button doesnt disappear when i select country. I want country name instead of select country but withCountryNameButton={true} not working.
Steps to Reproduce / Code Snippets
<View style={{ position: 'absolute', bottom: '20%' }}> <CountryPicker onSelect={(item) => setSelectedCountry(item)} withModal={true} withCountryNameButton={true} />
Expected Results
i wanna see country name instead of select country
Additional Information