I'm looping an array of element and I'd want to recursively display that element with given template
and then inside that template use button with toggle to show/hide deeper level template of Childs of given element (Child is also an Element)
<div v-for="(element in elements)">
<MyTemplate :element="element"></MyTemplate>
</div>
Here's my template:
<template>
<div>element.Name</div>
<button @click="toggleSomehow">
// I'd want to display it under that button when he's "showing"
<MyTemplate :element="element.Child"></MyTemplate>
</button>
</template>
But I'm not really sure how to do that SHOW/HIDE button without binding it with some property or array, but I'd rather want to avoid it because everything has to be kind of dynamic