wenzhixin / multiple-select

A jQuery plugin to select multiple elements with checkboxes :)
http://multiple-select.wenzhixin.net.cn
MIT License
1.9k stars 652 forks source link

Enable/disable options ? #617

Closed p-wieser closed 6 months ago

p-wieser commented 6 months ago

Hi, Maybe I do not know how to read your documentation - which is amazing by the fact ! -, or maybe I badly read it, but I do not find how to enable/disable an option. My use case is that not all options can be selected, but it exists some allowed combinations that I want respect in the UI, and not wait until the server to check that.. Any tip, please ? Best regards Pierre

p-wieser commented 6 months ago

Hello again, I eventually enable/disable individual options via jQuery and an index-based selector. So I fulfill my requirement. But it bellieve that this should be a multipleSelect method, doesn't it ? Best regards

wenzhixin commented 6 months ago

There's no method to update an option, but you can modify the data and refresh the select. https://multiple-select-live.wenzhixin.net.cn/code/wenzhixin/16913