-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawer does not respect the component hierarchy #11602
Comments
@BradfordMedeiros I think you didn't get the purpose of drawer component. It's modal component which can be called in any place in the tree and will be rendered strongly in one place inside user viewport. If you want different behaviour you probably need a different component. You can't position any component like this with only css. Which functionality are you trying to achieve with drawer? |
I want to be able to place a drawer inside another div. Basically I have a custom appbar and I don't want it to cover the appbar. Which seems like a pretty basic use case. I don't want to use override fixed positioning for the drawer since the appbar can change height via user customizations and the drawer needs to respond to that |
@BradfordMedeiros This behavior is specific to the Next time, please follow our issue template, providing a reproduction example helps, a lot. |
Awesome job guys. Been using this in beta, and so far I'm quite pleased with the changes in 1.0. Works really well so far.
Noticing the drawer attaches itself outside of the hierarchy it was placed in and decides to attach itself to the top level of the dom. This makes doing things like relative positioning to its containing element impossible (without hacks). This behavior might be convenient at first, but is relatively inconsistent.
This should instead be a child of the element it is placed in, and if I actually want it to be relative to the most outmost container, I would place it there, with explicit positioning via css overrides.
Seems like you can kind of overload this behavior via ModalProps and overriding the container, but seems like that won't work initially since the element seems like it has to already exist to override? So you can get it to work, but then you'll need to do hackey things via refs and rerendering once the div has been mounted to the dom, and that's always kind of tacky.
material-ui/core": "^1.0.0"
The text was updated successfully, but these errors were encountered: