Hide checkbox and append/prepend custom UI elements to each node
iviu23 opened this issue · 2 comments
Is it possible to hide all checkboxes when setting the tree view as foldable?
I would like to get a tree view like in the example of Material Design and Tree line but just without the checkboxes.
I am just allowing the user to create a hierarchy of tag names, so in that case it makes no sense to check items at all. Being able to drag the items around to rearrange them is completely enough.
Or maybe the checkboxes could be hided, at least?
On the other hand, I've read into the documentation that you can customize each node by appending/prepending UI elements, but just when rendering it as a table.
Would it be possible to do the same as for the tree view rendering mode?
It would come in handy for adding the common custom edit
and/or delete
buttons.
Thank you in advance.
<Draggable class="mtl-tree" v-model="treeData" treeLine>
<template #default="{ node, stat }">
<OpenIcon
v-if="stat.children.length"
:open="stat.open"
class="mtl-mr"
@click.native="stat.open = !stat.open"
/>
<input
class="mtl-checkbox mtl-mr"
type="checkbox"
v-model="stat.checked"
/>
<span class="mtl-ml">{{ node.text }}</span>
</template>
</Draggable>
this is the code of Material Design and Tree line, just remove input
if you don't need checkbox