Feature Request: disable drawer programatically
See original GitHub issueHi,
I would like to disable the drawer on some screens and reactivate it after in other screens, something like:
_drawerRef.setDisableProp(true|false)
I know I can do programatically close or open, but I would like to keep the close on tap gesture, and if possible the drag as well.
Thanks
Fx
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Disable swipe gesture from opening the navigation drawer ...
The drawer may still be opened and closed programmatically ... This will disable swipe to open while keeping swipe to close enabled.
Read more >Ability to disable Drawer edge-swipe · Issue #31127 - GitHub
I created a new issue to track a feature request for enabling a drawer ... Given that the drawer can only be opened...
Read more >Drawer Navigator | React Navigation
Component that renders a navigation drawer which can be opened and closed via gestures. ... It can be closed normally using gestures or...
Read more >DrawerLayout | Android Developers
DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from one or both...
Read more >Fragment Navigation Drawer | CodePath Android Cliffnotes
To use the Toolbar as an ActionBar , you need to disable the default ActionBar . This can be done by setting the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fxhereng –
Came up against this scenario as well recently and there’s not need for a change to react-native-drawer itself – simply utilizing state should get things working as intended.
In my case things were similar, the drawer was the parent component of my react native router flux component.
Handled as follows (terse, just showing the relevant bits):
With this in place, you can then call the disable and enable props from within the child component(s).
Even better! 👍