react-native-country-codes-picker icon indicating copy to clipboard operation
react-native-country-codes-picker copied to clipboard

Ts error in CountryPicker

Open amitrajora14 opened this issue 11 months ago • 2 comments

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.

amitrajora14 avatar Jul 14 '23 06:07 amitrajora14

Hi, I will look into it.

GeorgeHop avatar Sep 18 '23 06:09 GeorgeHop

Hey guys, we had the same issue so I created a PR in this repo that just adds some default testIDs so people can target the existing ones :)

gbyesiltas avatar Nov 03 '23 14:11 gbyesiltas