Switching drawer variants dynamically at runtime
See original GitHub issueHi,
I was wondering if you have any opinion on using drawers dynamically. I would like to use temporary for mobile, persistent for tablet and permanent for desktop.
However, a single drawer types class seems to be used throughout the contents of the drawer. For example in a persistent drawer as seen here I can count mdc-persistent-drawer__drawer
, mdc-persistent-drawer__toolbar-spacer
and mdc-persistent-drawer--selected
all used in different child components of the parent mdc-persistent-drawer
.
Doesn’t this make switching from one drawer type to another really difficult? Maybe you have some tips on how to solve a problem like this.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Drawer Navigation - Change list of items dynamically after ...
How can I change the list of options inside the drawer on runtime, after it was created? DrawerMainActivity.java Layout(template Navigation ...
Read more >Drawer - How to change content dynamically
I want to use a devextreme widget that can contain a dynamic HTML content using devextreme components like dxbutton,dxcheckbox…
Read more >Advanced techniques in Chakra UI - LogRocket Blog
Creating dynamic SVGs. When creating different themes for your website, you may want to dynamically change your SVGs to fit the current theme....
Read more >Interact programmatically with the Navigation component
Programmatically create and interact with certain navigation ... You can modify an inflated navigation graph dynamically at runtime.
Read more >Property Drawers - Unity - Manual
Now that you have the attribute, you need to make a Property Drawer that draws properties that have that attribute. The drawer must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Reopening this issue because it was brought up in https://github.com/material-components/material-components-web-codelabs/issues/78, and seems like a fairly common use case.
Not sure if this will help, but I came up with a different solution (@mui v5), please let me know what you think.
Here’s the codesandbox: https://codesandbox.io/s/responsivedrawer-material-demo-2-hnu6g
Key aspects: