Since version 1.0.7 NavigationDrawer does not initially set drawerType on first render
See original GitHub issueDescription
First of all, thanks for creating react-md. Of all the other react material ui frameworks out there we found react-md to be the most sane, performant and comprehensive.
So, it appears after Drawer change in version 1.0.7 (https://github.com/mlaursen/react-md/commit/81d8515c379214947ada59451968a5edd93da6da) the NavigationDrawer media type is no longer being initially set when the component mounts. I have to manually resize the browser for the drawer to correctly appear.
https://codepen.io/johnnyazee/pen/xqdoZR?editors=0010
If I add defaultMedia="desktop"
to then everything is fine on initial render in desktop mode, however, on an initial render on mobile or tablet device the media type for mobile is not updated. Resizing the browser triggers the media type to correctly set the drawer visibility/mode type.
My previous version was 1.0.6.
Version
- React latest
- React-MD 1.0.7
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
To make my life a little bit easier, I am going to make the assumption that if
visible
ordefaultVisible
istrue
on initial mount for theNavigationDrawer
orDrawer
, you have done some calculations yourself to make sure you really do want it visible until a resize event. It will still do any media type changes, just keep the visibility as-is until resize.Great teamwork here guys. Quite the community. I feel even better about giving react-md a try.