root-two / react-native-drawer

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

pressing a button on drawer doesn't execute the onPress function because drawer wish to execute closing #335

Open DevBkIL opened 6 years ago

DevBkIL commented 6 years ago

Hi there,

I'm trying to figure if there is a prop I'm missing out. I'm trying to execute a function when pressing a button that is located on the drawer.

<Drawer
        type={'overlay'}
        ref={'_drawer'}
        content={
          <SideBar
            sideBarToggle={this.toggle}
          />
        }
        open={this.state.sideBarToggle}
        closedDrawerOffset={0}
        negotiatePan={true}
        panOpenMask={0.25}
        panThreshold={0.25}
      >

I need to press very carefully not to invoke drawer movement and to invoke button function.

Is there anything to do?

indrasantosa commented 6 years ago

Happen to me as well, any solution for this?

viper4595 commented 6 years ago

For me, add panCloseMask={0.5} solve this.