Answer the question
In order to leave comments, you need to log in
How to get a collection of elements in vue?
Good afternoon. New to vue. Current project. The following task arose: there is a component, so to speak, it is a custom select, when you click on the div, the ul list drops out, and the checkboxes are in the li-boxes. So, how can I find all checked checkboxes in this list? The goal is to get the length of the resulting collection and output it to the counter on the div we click on. In native JS, I would search through querySelectorAll and take the length through length. Tell me plz.
I also thought to make it this option: all checkboxes are initially unchecked, make encrisis and decrisis of the counter by clicking on checkboxes. But still, I'm interested in the implementation described above, because. in the future, checkboxes may already be checked and this option will not work....
I would be grateful for your help, maybe I'm doing something wrong...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question