root-two / react-native-drawer

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

Removed child-drawer checks #319

Closed valerybugakov closed 4 years ago

valerybugakov commented 7 years ago

Hey, I was trying to use two nested drawers like this:

<Drawer 
  content={
    <Drawer content={channels}>{menu}</Drawer>
  }
>
  {children}
</Drawer>

When user tries to close nested drawer, when the parent drawer is opened, removed checks prevented him from doing that. I dug into commits and issues related to this topic and it seems that those checks are optimized for nesting via children (not content prop):

<Drawer content={menu}>
  <Drawer content={channels}>{children}</Drawer>
</Drawer>

Actually it's possible to implement required behavior using conditional values in panCloseMask and panOpenMask depending on open state of drawers, so those checks are not necessary. Please let me know if I missed anything here.