lawnstarter / react-native-picker-select

🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
https://npmjs.com/package/react-native-picker-select
MIT License
1.73k stars 491 forks source link

Add testId support to picker items #495

Closed LoserAntbear closed 10 months ago

LoserAntbear commented 1 year ago

Is your feature request related to a problem? Please describe.
Picker itself provide testId support, but items do not have it. For the sake of improvement of testing of the components testId support should be added.

Describe the solution you'd like
A testId prop should be added to the item in renderer method. Interestingly,PickerItem component already has it, but renderItem method does not propagate it.

Describe alternatives you've considered
For now the easies solution is a monkeypatch, but it's the last resort.

Additional details
Missing prop propagation

image

Proof of support of testID prop by Item component

image
LoserAntbear commented 1 year ago

I'd like to commit to this, if approved.

lfkwtz commented 10 months ago

498