We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class MyPicker extends Component { state = { selectedItem: 0 }; onItemSelected = selectedItem => { // When selectedItem is greater than 3, the scroll wheel will not jump with high probability this.setState({ selectedItem:selectedItem>3 ? 3 : selectedItem }); }; onPress = () => { this.setState({ selectedItem: 3 }); }; render() { return ( <View style={styles.container}> <Button title={"Select third element"} onPress={this.onPress} /> <Text>Selected position: {this.state.selectedItem}</Text> <WheelPicker selectedItem={this.state.selectedItem} data={wheelPickerData} onItemSelected={this.onItemSelected} /> </View> ); } } module.exports = MyPicker;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: