K
K
killwayne2019-04-15 22:11:00
Vue.js
killwayne, 2019-04-15 22:11:00

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

1 answer(s)
0
0xD34F, 2019-04-15
@killwayne

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.

Well, it means that you implemented them crookedly, that's all. Google how to do it right.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question