Open tybro0103 opened 7 years ago
Experiencing the same problem. Here, swipe motion is still captured by drawer under the modal. @tybro0103 did you find a fix to this eventually?
@roycclu I resorted to tracking whether or not there was a modal open and disabling the drawer:
<Drawer disabled={isModalOpen} />
...which is a bit messier than it seems at first, cuz the context in which you're rendering a modal is usually a different context than where you're rendering the drawer. You need to come up with a way to determine if there is any modal open anywhere in your app.
@tybro0103 Thanks man. Works like magic. Not very elegant, but gets the job done. Some kind of state store or react context should serve for global tracking. For me they happen to be on same component, so this was a easy fix. Thanks!
When one of my content views renders a
<Modal />
the drawer will still open and close with swipe gestures. Can't actually see it happening because the modal covers it up, but if you swipe over the modal and then close it, the drawer will then be open under it. Would like to see interaction with the drawer disabled while a modal is open. Perhaps there's a way to do this already? If it matters, here's my drawer props: