drawer-example icon indicating copy to clipboard operation
drawer-example copied to clipboard

How to prevent double clicking on Drawer opening icon

Open ShaikhKabeer opened this issue 8 years ago • 3 comments

Whenever I'm clicking drawer opening icon for multiple times, it goes into infinite state and opening and closing continuously. I need help.

ShaikhKabeer avatar Jan 02 '18 13:01 ShaikhKabeer

headerLeft: <View style={styles.leftIconContainer}>
      <Icon name="bars" style={styles.icon} onPress={() => {
        (navigation.state.index === 0) ? navigation.navigate('DrawerOpen') : navigation.navigate('DrawerClose')
      }} />
    </View>,

It will fix it ;)

rimiti avatar Jan 27 '18 14:01 rimiti

I've done this by using debounce from 'lodash' library. Anyway Thanks @rimiti

ShaikhKabeer avatar Jan 29 '18 14:01 ShaikhKabeer

You're welcome, can you close the issue ? 🚀🙏🏻

rimiti avatar Sep 25 '18 07:09 rimiti