-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Dropdown panels inside a Dialog aren't attached to Dialog #1895
Comments
Agreed |
Could you try to add blockScroll={true} on Dialog component. Like this, https://codesandbox.io/s/primereact-test-forked-hwrmw. |
This is indeed an effective workaround. On a personal note, I prefer to have reasons for blockScroll={true} that are decoupled from having a dropdown in the dialog, as it causes the scrollbar to disappear so the underlying content slightly jumps when the dialog toggles. |
We'll talk about what we can do for scrollbar behaviour as a team. |
This could be a consequence of (#1875) For dorpdown This caused css issues as dialog dont get its styles from parent. |
Hi, You can use appendTo="self" property of Dropdown on the next version. Best Regards, |
I'm submitting a ...
Codesandbox Case
TEST CASE
Current behavior
When rendering Dropdown inside a Dialog, the Dropdown popup panel is not attached to the dialog DOM element, causing it to scroll with the page.
Perhaps not an issue per-se, more like a consequence of "appendTo" that defaults to "body" since 6.2.0, precluding the possibility to avoid the under-the-hood usage of React.createPortal.
Furthermore, it's not possible (to my knowledge) to set "appendTo" pointing to the Dialog DOM element as a workaround before the mount is completed.
Expected behavior
Dropdown panel inside Dialog should be attached to the Dialog DOM element.
Minimal reproduction of the problem with instructions
(see TEST CASE link above)
PrimeReact version:
^6.2.1
Browser:
All
The text was updated successfully, but these errors were encountered: