Is it possible to trigger the Picker from another onPress handler?
See original GitHub issueWe render the Picker as a field in a list. We would like to trigger the picker to open when the Row has been tapped. Is there a way to do this?
I can see that within the Picker.ios.js
component, there is the following method:
_setModalVisible(visible) {
this.setState({ modalVisible: visible });
}
Would it be possible to expose this method? Or at least a prop that we can pass in to trigger the Picker to open?
We’re using native-base 2.3.5
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
React Native: onPress triggering another onPress
1 Answer 1 ... On Android, You can set the prop mode="dropdown" to show a dropdown anchored to the picker view. That renders...
Read more >How to use react-native-picker-select - LogRocket Blog
Android users can force it to use an unstyled TextInput by passing false to the useNativeAndroidPickerStyle prop. Further customization can now ...
Read more >Difference between addEventListener and onclick in JavaScript
The addEventListener() and onclick both listen for an event. Both can execute a callback function when a button is clicked.
Read more >react native picker open programmatically
Click on Button to Call Custom Function React onClick event handler is very much useful when we required to perform a particular action....
Read more >How To Trigger Button Click on Enter - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jync you can fork NativeBase and make the required changes to achieve what you want.
Has there been any updates to this? It seems like a very critical piece of functionality left out of core… 😞