Open patrickkabwe opened 3 years ago
can you elaborate a bit more please what you need to know
I think they want to know how to call the show() method manually? - rather than lib calling it itself
@smriti-spotnana Any suggestion?
Nope, I couldn't figure out myself ..
Please have a look in the examples, there you can find one for using show()
(dropdown_5).
Code for examples with Expo: https://github.com/siemiatj/react-native-modal-dropdown/blob/master/expo-example/App.js Code for examples without Expo: https://github.com/siemiatj/react-native-modal-dropdown/blob/master/example/index.js
You can also try the examples running on a phone or simulator.
Yes I can call show(), But the drop is not open. I hope the fullscreen overlay is coming but dropdown is not open.
const dropdownRef = useRef();
return (
<View>
<Button title="press" onPress={() => dropdownRef.current.show()} />
<ModalDropdown
ref={dropdownRef}
options={['aaa','bbb','ccc']}
/>
</View>
)
Hi donni106, Thanks for following up, In the above image there is a show( ) method which triggers the dropdown Modal to show. My question was how can i call the show( ) method in a case where i am using a custom Icon to display the dropdown modal? Thank you