Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Menu, {
MenuProvider,
MenuOptions,
MenuOption,
MenuTrigger,
withMenuContext,
} from 'react-native-popup-menu';
const Openner = (props) => (
props.ctx.menuActions.openMenu('menu-1')}>
);
const ContextOpenner = withMenuContext(Openner);
export default class ControlledExample extends Component {
onOptionSelect(value) {
alert(`Selected number: ${value}`);
if (value === 1) {
this.menu.close();
}
return false;
}
openMenu() {
this.menu.open();
}
onRef = r => {