Tinysymphony / react-native-drawer-menu

A drawer component for React Native Application.
MIT License
180 stars 43 forks source link

Bug on Orientation Change #12

Open gitlovenotwar opened 7 years ago

gitlovenotwar commented 7 years ago

There's a bug when the orientation changes, the drawer always shown. Here are some screenshots.

portrait_normal: portrait_drawer_close

Here's it it after changing orientation landscape_normal: landscape_drawer_close

gitlovenotwar commented 7 years ago

P.S. I am able to solve of it with custom styles with having drawer: { width: same as width of drawerWidth in the props). It should set automatically for drawer style in drawerWidth props(if there's none provided in style) to avoid this bug. Thanks.

dimblek7 commented 6 years ago

This issue is caused from device width given to the drawer.... I was able to solve the issue for tablets... Please refer following attachments to have a drawer with orientation support.

How to use:

  1. replace your index.js file inside 'react-native-drawer-menu' > Drawer

index.js.zip

rezaarifian commented 6 years ago

Still not working for me, If orientation on same Page. Because 'react-native-drawer-menu' > Drawer need update trigger to change

const width=(Dimensions.get('window').width > Dimensions.get('window').height) ? Dimensions.get('window').height : Dimensions.get('window').width;