v-for over a non reactive object with conditional directive v-if?? #11476
Unanswered
pragyan-shaw03
asked this question in
Help/Questions
Replies: 3 comments
-
That's because You can read about it here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
See the playground As Hiws said, it is recommended to use v-if and v-for in different dom. If you do not want to influence dom structure for that, use |
Beta Was this translation helpful? Give feedback.
0 replies
-
there are three things you need to remember here:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am traversing over a non reactive set of data where each object contains a boolean variable 'display' that tells if the item should be displayed or not. what if I write v-if='obj.display' with the for directive. I tried but it is not working.
<title>Document</title>i tried v-show and that was working fine. I know the difference in DOM changes of v-if and v-show but can't understand the difference in such scenarios. Please let me know and I am happy to get some advice as I am starting my journey learning vue.
src code:
`
Beta Was this translation helpful? Give feedback.
All reactions