-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
always render content of the drawer to use with getElementById #379
Comments
I also have this issue. Have you solved it yet? |
nope, tried wrapping it in a component with open always true but it unmount as soon as I click outside to close. |
the Content component has a prop named forceMount... maybe it can work. will try tonight https://www.radix-ui.com/primitives/docs/components/dialog#content |
okay, i found a solution ( i'm using Sveltekit) and used the doc api of bits-ui https://www.bits-ui.com/docs/components/dialog#dialogroot I use the prop portal to teleport the drawer to a div then onOpenChange to detect when the drawer is opened thus mounted and then I can instantiate my OverlayScrollbars by getting the id of the content ( i have to set a custom id too) :
|
Thank you for your response. I have decided to use the Ant Design UI framework instead. |
Hi,
i'm using OverlayScrollbars library to customize scrollbar of a div and I need the content of the drawer to always be renderered so the html element exist and is treated by OverlayScrollbars.
Is there an prop to always render the content and when we open the draer it just sets visibility to visible ?
Right now when the drawer is triggered, it destroy and recreate its content.
The text was updated successfully, but these errors were encountered: