Skip to content
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

feat: Allow 'multiple' Listbox options #92

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chaseweaver
Copy link

Added

  • multiple as a Listbox option allowing a multi-select
  • Listbox example using multiple

Note

I needed this for a project I'm migrating over to Svelte (from Vue), so I make a quick fork to implement the multiple option that HeadlessUI currently has (near 1:1 implementation).

I took a glance at #47, #57, and #63 where you mentioned doing a bit of a rework. If this PR won't work because of that, no worries.

@vercel
Copy link

vercel bot commented May 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svelte-headlessui ✅ Ready (Inspect) Visit Preview Nov 6, 2022 at 3:09PM (UTC)

@sureshjoshi
Copy link

Small quality of life improvement for anyone using this PR - you'll want to probably wrap the $api.closeListbox(); call in ListboxOption.svelte with a if ($api.mode === ValueMode.Single) check so it stays open during multiple clicks.

@chaseweaver
Copy link
Author

Small quality of life improvement for anyone using this PR - you'll want to probably wrap the $api.closeListbox(); call in ListboxOption.svelte with a if ($api.mode === ValueMode.Single) check so it stays open during multiple clicks.

Ah, good call! Added 👍

@philmas
Copy link

philmas commented Jun 20, 2023

@rgossiaux, Is it possible to select multiple listbox options in version 2.0 of svelte-headlessui?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants