Can I use only dialog from Picker without rendering Picker itself in React Native 0.48? I want to open Picker's list on button click. There's an obvious way creating a hidden Picker and rerouting clicks to it, but is it the only solution?
You can use this: https://docs.nativebase.io/Components.html#actionsheet-def-headref
native base provide ui kit for react native. You look actionSheet section.
Related
I'm using react-native picker in dialog mode. Now I want to call a function whenever the dialog opens. How can I achieve that because there is no onPress prop? Any help will be appreciated. Please don't recommend any other packages because I want to use the default one.
You can achieve it without using Picker, use TouchableOpacity to call a function, and in the same function just open a Modal for showing the list of items of Picker and close the Modal when selecting any item from the list.
I am using modal for React Native UI kitten.
But the problem is I did't find anything like onRequestClose prop like the React Native provides for the modal. Nothing mentioned on their API also.
So is there anything like I can close the modal on back button press?
I suggest react-native-modal which is easy to use and customize https://github.com/react-native-modal/react-native-modal
I am using react-native-picker. In iOS it displays as
I expect android could have the same UI but it always shows a dropdown box
Is there any library to support UI in Android the same way as iOS?
I haven't tested these packages on Android, but have you tried them?
Smooth Picker
React Native Scrollable Picker
ScrollView Picker
Scroll Picker
Let me know if they work for you.
My react native version is 0.55.4 , when modal showing keyboard dismiss , how can show modal without dismissing keyboard.
You need a little hack!
For example you can auto focus on a input in your modal (More info)
Or use a custom modal that not related with native keyboard (You can write this yourself or use some package like this)
I am using Picker component in native-base. In android picker component shows the dropdown icon but in IOS it did not show.
It's Possible in Android.But in ios it's in development. we expect that feature available in future.