react-native-country-codes-picker
react-native-country-codes-picker copied to clipboard
Ts error in CountryPicker
the given type for the CountyPicker is a following,
interface Props { excludedCountries?: string[], showOnly?: string[], popularCountries?: string[],
style?: Style,
show: boolean,
enableModalAvoiding?: boolean,
disableBackdrop?: boolean,
onBackdropPress?: (...args: any) => any,
pickerButtonOnPress: (item: CountryItem) => any,
itemTemplate?: (props: ItemTemplateProps) => JSX.Element,
ListHeaderComponent?: (props: ListHeaderComponentProps) => JSX.Element,
onRequestClose?: (...args: any) => any,
lang: string,
inputPlaceholder?: string,
inputPlaceholderTextColor?: TextStyle['color'],
searchMessage?: string,
androidWindowSoftInputMode?: string,
initialState?: string,
}
Now, As I my writing test in my application where I have used this CounteryPicker component, so, I have to test this CountryPicker for that I have find the element of the text input from where I can search the country and then select that country, so for that I have to pass testId to the textInput, the type of CountryPicker does not have the testID props but If I am passing it forcefully than I works.
Hi, I will look into it.
Hey guys, we had the same issue so I created a PR in this repo that just adds some default testID
s so people can target the existing ones :)