You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I have a Todo List. I am trying to print a certain text in TodoList.vue depending on if any objects of the items array contain isComplete = true. The issue is that even when I check a todo item, and an item's property isComplete gets updated to true in the Pinia store, the TodoList.vue component does not see it within the computed property someTodoCompleted. The computed property does not react to that change.
How can you in a component with Options API listen to the changes of objects within an array? How to make this h2 tag display the text based on someTodoCompleted returning true?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
codesandbox: https://codesandbox.io/s/prod-surf-wbbmt5
Here I have a Todo List. I am trying to print a certain text in TodoList.vue depending on if any objects of the
items
array containisComplete = true
. The issue is that even when I check a todo item, and an item's propertyisComplete
gets updated to true in the Pinia store, the TodoList.vue component does not see it within the computed propertysomeTodoCompleted
. The computed property does not react to that change.How can you in a component with Options API listen to the changes of objects within an array? How to make this h2 tag display the text based on
someTodoCompleted
returning true?Beta Was this translation helpful? Give feedback.
All reactions