@@ -59,6 +59,7 @@ interface Props {
5959
6060 lang : string ,
6161 inputPlaceholder ?: string ,
62+ inputPlaceholderTextColor ?: TextStyle [ 'color' ] ,
6263 searchMessage ?: string ,
6364 androidWindowSoftInputMode ?: string ,
6465 initialState ?: string ,
@@ -69,6 +70,7 @@ export const CountryPicker = ({
6970 popularCountries,
7071 pickerButtonOnPress,
7172 inputPlaceholder,
73+ inputPlaceholderTextColor,
7274 searchMessage,
7375 lang = 'en' ,
7476 style,
@@ -261,6 +263,7 @@ export const CountryPicker = ({
261263 value = { searchValue }
262264 onChangeText = { setSearchValue }
263265 placeholder = { inputPlaceholder || 'Search your country' }
266+ placeholderTextColor = { inputPlaceholderTextColor || '#8c8c8c' }
264267 { ...rest }
265268 />
266269 </ View >
@@ -289,8 +292,8 @@ export const CountryPicker = ({
289292 style = { [ style ?. itemsList ] }
290293 keyboardShouldPersistTaps = { 'handled' }
291294 renderItem = { renderItem }
292- ListHeaderComponent = { ( popularCountries && ListHeaderComponent ) &&
293- < ListHeaderComponent countries = { preparedPopularCountries } lang = { lang } /> }
295+ ListHeaderComponent = { ( popularCountries && ListHeaderComponent && ! searchValue ) ?
296+ < ListHeaderComponent countries = { preparedPopularCountries } lang = { lang } /> : null }
294297 { ...rest }
295298 />
296299 ) }
@@ -394,8 +397,8 @@ export const CountryList = ({
394397 style = { [ style ?. itemsList ] }
395398 keyboardShouldPersistTaps = { 'handled' }
396399 renderItem = { renderItem }
397- ListHeaderComponent = { ( popularCountries && ListHeaderComponent && ! searchValue ) &&
398- < ListHeaderComponent countries = { preparedPopularCountries } lang = { lang } /> }
400+ ListHeaderComponent = { ( popularCountries && ListHeaderComponent ) &&
401+ < ListHeaderComponent countries = { preparedPopularCountries } lang = { lang } /> }
399402 { ...rest }
400403 />
401404 )
0 commit comments