Reputation: 193
https://cmichel.io/how-to-create-a-more-popup-menu-in-react-native/ how I need to call popupmenu from this example
Upvotes: 1
Views: 3636
Reputation: 22209
Assuming that you have UIManagerModule.showPopupMenu
in your modules,
then you can call this class via UIManager
class
import { UIManager, findNodeHandle } from 'react-native'
UIManager.showPopupMenu(
findNodeHandle(this.state.icon),
this.props.actions,
this.onError,
this.props.onPress
)
It is opened by finding the reference node
of the icon
as shown here.
It works only on android though, and can be followed here
Upvotes: 4