-
Notifications
You must be signed in to change notification settings - Fork 433
Close side menu clicking on another button #245
Comments
Hi @IronTony, Unfortunately, I don't have enough time to make an example for you, but the general idea would be like this: When you click on button, emit an action that re-render menu with two props:
|
@Kureev - unfortunately if you want to maintain your state when also using gestures you have to dispatch an action from It's tricky to work around because This seemed to be what @grabbou addressed in #175 addressed but that's a while out of date now. * |
@Kureev @rh389 I have an issue with what you said which is related to this. Hopefully you might be able to help, thank you for your time! If you don't mind, allow me to provide a verbose version so I'm clear. I'm using react-native-side-menu and react-native-hamburger. the side menu is in a file called Nav.js, the hamburger button is used in a separate view, and is in its own file called HamburgerButton.js. I set up a simple observer pattern with the corresponding Actions.js, ActionTypes.js, Dispatcher.js, and Store.js. I can confirm if I press the hamburger component located inside the homescreen view, it dispatches an event to update the state of "menuState" to true, the same event is listened to by Nav.js which then updates the side menu's If you don't mind, here's the source code: HamburgerButton.js:
Nav.js (has the side menu):
The console logs show everything happening correctly: Any ideas where this is going wrong? Why the menu isn't opening as soon as |
Hi all,
I have read these issues, but I didn't find an answer to my question.
I am using this component, that made my day, and I am using this with Router Flux.
So in my App.js as you can see I have the sidemenu and the router:
Then in Menu.js I have the render() of the menu. I'd like that clicking on a menu item, the menu will be closed automatically with its effect. Unfortunately I am not able to do this. Any help?
This is my menu item:
Sorry for the indentation problem.....
The text was updated successfully, but these errors were encountered: