Tigran84
Tigran84

Reputation: 193

how to show popup menu when touching in Icon

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

Answers (1)

Pritish Vaidya
Pritish Vaidya

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

Related Questions