Open marcovignotto opened 4 years ago
I think your plugin is great! But how to get the values instead of the position? Example:
const wheelPickerData = ['3', '4', '5', '6', '7', '10']; const MyPicker = props => { const [state, setState] = useState(); const onItemSelected = item => { setState(item); console.log(item); }; return ( <View> <WheelPicker // selectedItem={this.state.selectedItem} data={wheelPickerData} onItemSelected={onItemSelected} /> </View> ); };
with this I just get the position of the wheel but not the value of the selection How to? Thanks!
value = wheelPickerData[state]
I think your plugin is great! But how to get the values instead of the position? Example:
with this I just get the position of the wheel but not the value of the selection How to? Thanks!