reactjs - Is it possible to open another menu with a menu option? -


currently can open menu clicking menu trigger , works well. i'm trying implement process can open menu-a, select option menu-a open menu-b using slide in method. possible module?

you can use menu controlled component declare menus should opened , closed. example:

export default class controlledexample extends component {   state = {     opened1: false,     opened2: false,   }    render() {     return (       <menucontext style={{ flexdirection: 'column', padding: 30 }}>         <menu           opened={this.state.opened1}           onbackdroppress={() => this.setstate({ opened1: false })}           onselect={() =>             this.setstate({               opened1: false,               opened2: true,             })}         >           <menutrigger             onpress={() => this.setstate({ opened1: true })}             text="select option"           />           <menuoptions>             <menuoption value={1} text="one" />             <menuoption value={2} text="two" />             <menuoption value={3} text="three" />           </menuoptions>         </menu>         <menu          renderer={slideinmenu}           opened={this.state.opened2}           onbackdroppress={() => this.setstate({ opened2: false })}           onselect={() => this.setstate({ opened2: false })}         >           <menutrigger />           <menuoptions>             <menuoption value={1} text="one *" />             <menuoption value={2} text="two *" />             <menuoption value={3} text="three *" />           </menuoptions>         </menu>       </menucontext>     )   } } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -