R
R
rockerok_n2018-04-27 15:58:46
Vue.js
rockerok_n, 2018-04-27 15:58:46

How to add an element to a specific group in Vue.js from a list created by v-for?

Good afternoon, I'm trying to implement adding an item to a specific section of the task list. There is a list of groups created using v-for from an array, and tasks should be added from the inputs to each individual group and displayed inside only this group. I tried to do this by getting a link to the current object in the array of groups and pushing a new object through it, but this way tasks are added to all groups at once. Tell me how to make the element added to the group that was clicked on? I can't think of.
Here is a simplified version of the component code:
https://jsfiddle.net/rokerok_22/3vqs7ovx/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2018-04-27
@rokerok_n

https://jsfiddle.net/yarkov_aleksei/3vqs7ovx/2/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question