react-native-picker / picker

Picker is a cross-platform UI component for selecting an item from a list of options.
MIT License
1.45k stars 273 forks source link

How can I use the picker horizontal? #477

Open MErenTalan opened 1 year ago

MErenTalan commented 1 year ago

How can I use the picker horizontal? I tried to simply give style transform rotate 90 degs but it also rotates text. And I can't rotate text by its own. So it creates the view below. How can I use the picker horizontally? I tried to fork the library and give label style like the below code but it also didn't work.

The PickerItem.js I edited (it didn't work) <Option disabled={enabled === false ? true : undefined} style={{color}} testID={testID} value={value} label={label}> <Text style={{transform: "-90deg"}}> {label}</Text> </Option> );

image