andreww1011 / filter-multi-select

Multiple select dropdown with filter jQuery plugin.
Other
28 stars 15 forks source link

Radio options for single selects #24

Open peixotorms opened 1 year ago

peixotorms commented 1 year ago

Hi there,

Thank you for the great library.

This might be related to #16 but what I really would like to ask, is if it's possible to show a radio select option instead of checkboxes, when we set selectionLimit: 1

You see, if we set it to 1, it will show checkboxes and when people see checkboxes, they assume we can select them all. Also, even if it's clear that they cannot select them all, if you have one checkbox selected, you cannot switch to another, so you have to disable it first then select the other.

I think making it into a radio button would be more intuitive, but I would be happy if when I have 3 options and only 1 is allowed, to make it behave like a radio.

EX: user click option 1 and it get's selected. user then click option 2. In this case, selection 2 should be selected and option 1 disabled. basically, whatever option they click, should be the one selected, similar to a radio button.

Is this possible, or perhaps you can extend this library?

Thank you