Answer the question
In order to leave comments, you need to log in
How to disable click on checkbox in Vue.js condition?
There are many checkboxes - you can select up to 3 pieces, where the rest become unavailable, and if 1 checkbox remains selected, then you cannot click on it
.
Checkboxes are custom and when you click on one of them for the second time, they completely ignore the checked and disabled properties
Thank you very much in advance!
Answer the question
In order to leave comments, you need to log in
Obviously - add disabled. For the selected checkbox - when the number of selected checkboxes is less than or equal to the minimum allowed. For not selected - when the number of selected checkboxes is greater than or equal to the maximum allowable.
https://jsfiddle.net/x6uzv5hw/
Checkboxes are custom and when you click on one of them for the second time, they completely ignore the checked and disabled properties.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question