()
| 17 | |
| 18 | const MenuManagerExample = React.createClass({ |
| 19 | getInitialState() { |
| 20 | return { |
| 21 | title: 'Example', |
| 22 | itemTitle: '', |
| 23 | items: [{ |
| 24 | title: 'First submenu', |
| 25 | key: 'f', |
| 26 | callback: () => AlertIOS.alert('Menu Example', 'You have clicked on the test item', [ |
| 27 | {text: 'OK', onPress: () => console.log('OK Pressed!')}, |
| 28 | ]) |
| 29 | }] |
| 30 | }; |
| 31 | }, |
| 32 | |
| 33 | _addNewSubmenu() { |
| 34 | MenuManager.addSubmenu(this.state.title, this.state.items); |