I have added multiline support to the react native Picker by adding this
Android: Strings.xml
<style name="SpinnerDropDownItem" parent="Theme.AppCompat.Light.NoActionBar">
...
<item name="android:inputType">textMultiLine</item>
...
</style>
<Picker style={styles.picker}
selectedValue={selectedValue}
onValueChange={(itemValue, index) => {
console.log(index)
}
}
>
... <picker items> ...
</Picker>
Ref: How to style the React-native picker items to wrap the lengthy text?
but unfortunately onValueChange
is not triggering after adding multiline.
How can I get the onValueChange event on multiline Picker.
Am using RN .59.x (RN Upgrading is not feasible for me :( ) and picker mode as DIALOG
..
Any other option to add the multiline support other than updating the strings.xml
Sample (single line): https://reactnative.dev/docs/picker