godbasin / vue-select2

select2 component in vue.
MIT License
123 stars 62 forks source link

How to disable particular options based on certain conditions? #35

Closed ifarooq closed 3 years ago

ifarooq commented 3 years ago

Sometimes based on certain condition we have to disable few options as we do in normal select. <option value="two" disabled="disabled">Second (disabled)</option> i.e :disabled="a==b&&x==y" Can we we achieve this functionality?

godbasin commented 3 years ago

This feature is now supported, you can try it.

ifarooq commented 3 years ago

Thanks much, some code samples or documentation on this? As currently, we pass an array of options so need some help on how to disable particular options.