R
R
rockerok_n2018-05-08 16:54:29
Vue.js
rockerok_n, 2018-05-08 16:54:29

How to make checkboxes displayed by v-for independent in Vue?

I ran into a problem:
I display an object containing a list of tasks for each project, in the list next to each task there is a checkbox for changing the status, and so when moving from the list of one object to the list of another, the checkboxes remain the same, that is, if the previous object had them are pressed, then the new one will have them, although they were not pressed and vice versa. Accordingly, the cant with the status. Using :key with a unique id didn't help. The use of the cycle is necessary, since in the original the user creates projects and tasks himself.
Example: https://jsfiddle.net/rokerok_22/zqecsa4a/
Tell me how to solve?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2018-05-08
@rokerok_n

Something like this: https://jsfiddle.net/xwh95n2m/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question