-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] persistent=true open=false, component visible after adding props/children that increase size #10183
Comments
Yes, I was referring to this pattern for the |
@freb The current behavior is a tradeoff. People can unmount the drawer from the DOM once the animation is finished: <Drawer
variant="persistent"
SlideProps={{
unmountOnExit: true
}} It's solving your problem: https://codesandbox.io/s/v8592mk02l. |
@oliviertassinari note that tabbing through the page and focusing on an element inside the drawer will bring the drawer into view (if it was closed to begin with). I'm not sure if that's expected or not, but it's definitely a bit off as it's hard to close it afterwards. I've tried with x266ry1rvw, not sure if it's the same for this issue's case. |
Instead of unmounting on exit, why not just set the subtree to |
@issuehuntfest has funded $20.00 to this issue. See it on IssueHunt |
Expected Behavior
This issue is similar to #8963, to which I added a comment. If children are added to a drawer where
persistent=true
, the component will spill onto the page.The component position should update automatically in order to stay hidden or provide the caller with the information needed to resize the component.
@oliviertassinari said: "The resolution should be about adding an action property to the Slider so people can programmatically update the position."
Current Behavior
Currently the drawer content spills onto the page when children are added while the drawer is closed.
Steps to Reproduce (for bugs)
See a demo here:
https://codesandbox.io/s/vqvzk2zv2y
Context
I'm using a bottom anchored persistent drawer for a list of file uploads. The drawer content has a
max-height
, but the exact height isn't specified. I want the drawer to be the right height to only be as large as needed to cover the list of uploaded files. Currently, as completed uploads are added to the list, if the drawer is closed, the content will spill onto the page until the drawer is opened and then closed again.Your Environment
The text was updated successfully, but these errors were encountered: