Skip to content

Multiselect portal #306

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

Merged
merged 9 commits into from
May 17, 2025
Merged

Multiselect portal #306

merged 9 commits into from
May 17, 2025

Conversation

janosh
Copy link
Owner

@janosh janosh commented May 17, 2025

Closes #301.

supersedes PR #302 as it doesn't add a new dependency (popper.js), instead using a simple Svelte portal action. should probably be migrated to an attachment (sveltejs/svelte#15000) in the future

janosh added 8 commits May 16, 2025 06:19
also reinstate multiselect test 'opens dropdown on focus', no longer fails
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
@janosh janosh added the enhancement New feature or request label May 17, 2025
@janosh janosh temporarily deployed to github-pages May 17, 2025 14:43 — with GitHub Actions Inactive
@janosh janosh temporarily deployed to github-pages May 17, 2025 15:12 — with GitHub Actions Inactive
@janosh janosh merged commit 5772985 into main May 17, 2025
7 checks passed
@janosh janosh deleted the multiselect-portal branch May 17, 2025 15:13
@janosh janosh mentioned this pull request May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Portal / render the multiselect outside of the current DOM structure
1 participant