Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report][3.6.14] v-treeview. labs. Tree nodes with no children are not correctly indented above their immediate parent. #20421

Closed
PlanetPush opened this issue Sep 4, 2024 · 4 comments
Assignees
Labels
C: VList C: VTreeview T: bug Functionality that does not work as intended/expected
Milestone

Comments

@PlanetPush
Copy link

Environment

Vuetify Version: 3.6.14
Vue Version: 3.4.27
Browsers: Chrome 128.0.0.0
OS: Windows 10

Steps to reproduce

Add an items array with children that have multiple children.
Make sure that of those children, some have children and some have no children.

Expected Behavior

All tree nodes should be correctly indented below their immediate parent.

Actual Behavior

A child node with no children is not correctly indented below its parent.

Reproduction Link

https://play.vuetifyjs.com/#...

@PlanetPush
Copy link
Author


20421

See attachment.
Checkbox 1 (which is an immediate child of checkbox 0 and has no children of its own) should be aligned with the left edge of checkbox 2

@PlanetPush
Copy link
Author

CSS Hack to fix:

.v-list-item.v-list-item--link.v-list-item--slim.v-theme--light.v-list-item--density-default.v-list-item--one-line.rounded-0.v-list-item--variant-text.v-treeview-item:not(.v-list-group__header) {
padding-inline-start: calc(39px + var(--indent-padding)) !important;
}

@mikkowsx
Copy link

+1

@david-wg2
Copy link

Workaround (based on @PlanetPush's solution):

.v-list.v-treeview .v-treeview-item:not(.v-list-group__header) {
    padding-inline-start: calc(39px + var(--indent-padding)) !important;
}

.v-list.v-treeview .v-treeview-item .v-list-item__spacer {
    width: 4px !important;
}

@yuwu9145 yuwu9145 self-assigned this Nov 13, 2024
@johnleider johnleider assigned johnleider and unassigned yuwu9145 Jan 20, 2025
@johnleider johnleider added this to the v3.7.x milestone Jan 20, 2025
manuelleduc pushed a commit to xwiki-contrib/cristal that referenced this issue Jan 29, 2025
Revert CRISTAL-413 (792367c) as the workaround is not needed anymore thanks to vuetifyjs/vuetify#20421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VList C: VTreeview T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

6 participants