As Vue.js to draw a conclusion extra of the list, clicking a particular item of an existing list in another component?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
22 views
I want to make a list of tasks created by the user clicking on the menu item created with v-for within the other circular list of groups displaying the list of tasks occurs in another component. Items in all lists are added by the user. Tried to do a double nested arrays with the current key of the iteration, such values are preserved but the curve appear only after clicking on another group and when pressing on the corresponding menu item are not displayed in the right component. All too cumbersome, stupor. Can structurally change something? As it is easier to make a list of tasks added were tied to a specific menu item is displayed, and each press on him?
Here's a simplified code: https://jsfiddle.net/rokerok_22/vnvvpg9a/1/
by | 22 views

2 Answers

0 like 0 dislike
All too cumbersome, stupor.

And you know why? Reason number one - goat variable names, object properties, etc. for Example, if your groups contain projects, and would call the appropriate property projects, not arr. Projects contain tasks so their list is called tasks, and not arr. And so you have two different arr - and no one outright will not say what it is. Already enough to get confused.

Selected group/project instead of indexes it is better to keep a reference to the object itself, in case the project his own, and to pass into the component - so it will be available a list of the existing problems and your problem with their conclusion will be solved by itself.

When adding a new task grind their list - why?

Slightly tweaked your code, like here. It looks like what you wanted?
by
0 like 0 dislike
Reason number one - goat variable names, object properties, etc.

Fierce plus.
pr_title ? taskname ? showPro ?
Another option, without the component.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 14, 2019 by Bellicus
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users