-
Notifications
You must be signed in to change notification settings - Fork 41
Portal / render the multiselect outside of the current DOM structure #301
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
Comments
sounds good, happy to take a PR for that 👍 |
Hey Janosh - I got a PR in for a new Hope it helps : ) |
janosh
added a commit
that referenced
this issue
May 17, 2025
to extend dropdown outside of parent component (e.g. inside a modal dialog) - new `portal` function manages dropdown rendering if portal prop is not empty - `MultiSelectProps` include optional `portal` parameter to enable and customize portal functionality - refactored the `add` function to simplify max selection logic - improved CSS for dropdown positioning and z-index management when using the portal
Merged
janosh
added a commit
that referenced
this issue
May 17, 2025
* fix drag and drop selected options and reinstate playwright test also reinstate multiselect test 'opens dropdown on focus', no longer fails * more CmdPalette coverage with vitest in tests/unit/CmdPalette.svelte.test.ts * simplify CSS scoping * add/remove use generic T for option arg type, rename arg for clarity * minor refactor CmdPalette * fix escape key navigating back to landing page from demo pages * add portal functionality to MultiSelect component (closes #301) to extend dropdown outside of parent component (e.g. inside a modal dialog) - new `portal` function manages dropdown rendering if portal prop is not empty - `MultiSelectProps` include optional `portal` parameter to enable and customize portal functionality - refactored the `add` function to simplify max selection logic - improved CSS for dropdown positioning and z-index management when using the portal * add /modal/+page.svelte demo page for portal feature * playwright test for MultiSelect portal feature
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a pretty common issue w/ dropdowns is how they interact with Modals.
Ideally the dropdown overflows outside of the modal instead of causing it to expand / scroll.
This is often fixed with portals.
Wondering what your thoughts on fixing this are.
Cheers,
Marc
The text was updated successfully, but these errors were encountered: