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

Add filterSelections and hideSelections options #187

Closed
wants to merge 4 commits into from
Closed

Add filterSelections and hideSelections options #187

wants to merge 4 commits into from

Conversation

raiyni
Copy link

@raiyni raiyni commented Aug 11, 2023

From what I could tell, there was no canonical way to prevent filtering from the dropdown when multiple = true.

This adds a simple option to disable that behavior. A reason someone might want that ability is to use checkboxes as an on/off display.

I also didn't see a way to hide the selections part. When using a toggle field, like a checkbox, that selections part is way too much clutter. With that, selections also should probably be removed if they are clicked on again.

An example is added how someone might use checkboxes in the dropdown.

@mskocik
Copy link
Owner

mskocik commented Aug 20, 2023

I would say you are thinking about it wrong. Basically you are disabling all useful core svelecte's features and turn it into dummy checkbox list. Using Svelecte for that is just pure overkill.

It would be better if you had separate component for funcionality like this if you need it and not bend Svelecte to it. Actually not something I would like to have in the lib.

@mskocik mskocik closed this Aug 20, 2023
@raiyni
Copy link
Author

raiyni commented Aug 20, 2023

I would argue that you are thinking about this PR the wrong way.

The features that you are considering useful core features are actually annoying and wasteful when it comes to a complete user experience. Ironically, the two options added by this PR bring this component more in line with what a normal user would expect out of a multiselect component.

I don't have to use this component but it was the most simple of the big 3 svelte multiselect components that looked to fulfill my needs. It's cool though.

@mskocik
Copy link
Owner

mskocik commented Aug 20, 2023

I agree with you on "bring this component more in line with what a normal user would expect out of a multiselect component.", but I consider it more an autocomplete than just multiselect.

Anyway... I couldn't merge it even if I wanted to, because WIP code is different from the latest master. But I will use this feature as blueprint, what should be possible to do out of the box in v4

mskocik added a commit that referenced this pull request Feb 17, 2024
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

2 participants