Skip to content

Treeview - any way to fill expand-icon space for items without children, to align text? #20561

Discussion options

You must be logged in to vote

Found most of a solution in the treeview example for load-children.
You have to add to the prepend slot, and insert an list-item-action element with an internal width that matches the buttons used in expand/colapse, so that the correct spacer widths get applied.

<v-treeview>
  <template #prepend="{item}">
    <v-list-item-action
      v-if="!item.children"
    >
      <div style="width:28px" />
    </v-list-item-action>
  </template>
</v-treeview>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by josh-hemphill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant