Skip to content

Closing the Drawer component when used as a nav menu #6545

Answered by adidahiya
nerdstep asked this question in Q&A
Discussion options

You must be logged in to vote

Drawer is a controlled component, so you need to set its isOpen state explicitly with that prop. There's no uncontrolled functionality that would allow something like the Classes.POPOVER_DISMISS class to work. So you will need to hook up your MenuItem click handler to set some state in your application which sends isOpen={false} to the relevant Drawer.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nerdstep
Comment options

Answer selected by nerdstep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants