or
It's possible to generate toolbar item based on array of object as below sample? I try but I hit v-for & v-if not allowed to use together.
Hello,
In the following snippet, if variable changes subsequent to the ToolBar being rendered, the ToolBarItem doesn't dynamically appear/disappear. Seems like it's disconnected from state.
<ToolBar>
<ToolBarItem type="button" text="Do Something" id="button-one" v-if="variable"></ToolBarItem>
</ToolBar>
Have been able to work around this by dynamically including classes on a parent DOM element, and then, using CSS, either show or hide the element depending on the presence of the class. However this doesn't feel right and breaks from Vue convention
<div :class="{ 'special-class' : variable }">
<ToolBar>
<ToolBarItem type="button" text="Do Something" id="button-one"></ToolBarItem>
</ToolBar>
</div>
<style>
#button-one {
display:none;
}
.special-class #button-one {
display:inline-flex;
}
</style>
Is there something I am missing? Perhaps another way to approach, or maybe conditional support via v-if is coming soon for Vue ToolBarItem?
Thanks!