[3.x] Add selectable prop on VueSelect component #1619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Twill uses Vue Select component which is extended in the Twill vselect component. From 3.3.0 Vue Select, there is a new component prop
selectable
which allows us to set the disabled state on specific select options.If we don't pass any value (default case), all options would be available in the select.
Usage:
form.blade.php
Note on the third item we have new property
selectable
which allows us to set a boolean value regarding should be option selectable or not.It's hard to see the change here since Lightshot doesn't capture the icon which is shown over the non-selectable option.
Also, it creates some CSS class conflict in which the -1 element keeps a hover state.
I will inspect this and create documentation in the next commits.
Related Issues
Fixes #1266