root-two / react-native-drawer

React Native Drawer
MIT License
2.54k stars 392 forks source link

Close the drawer when tapped any drawer menu #355

Open gujral1997 opened 6 years ago

gujral1997 commented 6 years ago

I want that drawer should automatically close If I tap any of the menu or sub menu in the drawer.

                      if(submenuTitle.submenu == "Stream Settings") {
                        // redirect user to the stream settings page
                        Actions.settings();
                      }

                      if(submenuTitle.submenu == "Manage social accounts") {
                        // redirect user to the connect page
                        Actions.connectCard();
                      }

                      if(submenuTitle.submenu == "Go Live") {
                        // redirect user to the stream page
                        Actions.goLive();
                      }
                    }}

Above is the part of my drawer code. I want my drawer to close before navigating to another page when I tap any sub-menu like Go Live