vuetify
vuetify copied to clipboard
[Bug Report][3.5.13] VTreeView Select Functionality (Prepend slot, selectable prop v-model value, click:select event)
Environment
Vuetify Version: 3.5.13 Last working version: 2.7.1 Vue Version: 3.4.21 Browsers: Chrome 123.0.0.0 OS: Windows 10
Steps to reproduce
-
Use a prepend slot in conjunction with the selectable prop on the tree
-
Utilize the "selectable" prop to populate the v-model array with selected values
-
Trigger a method when a selectable checkbox is selected
Expected Behavior
-
Checkbox shows up next to prepend icon
-
Selecting the "selectable" checkbox adds the value to the v-model array
-
Event click:select is triggered when checkbox is selected
Actual Behavior
-
Prepend slot overwrites the checkbox when the "Selectable" prop is selected
-
Event click:select does not trigger when selecting the built-in checkbox
-
v-model array for treeview does not update when selectable checkboxes are selected
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
documentation on how to use v-treeview-item would be nice
Would be awesome if you could help test PR #19795, this is what I fixed so far
The return object prop does not seem to be working, and is returning the object keys
@click:select also does not seem to fire still
i'm also unsure how you got the prepend slot next to the items with children and the down arrow. Checkbox as well
@click:select also does not seem to fire still
Fixed
The return object prop does not seem to be working, and is returning the object keys
Will resolve as a separate fix later
i'm also unsure how you got the prepend slot next to the items with children and the down arrow. Checkbox as well
Turns out the prop "activatable" was causing this for me. i didn't need it, so i removed it. I also needed to set
select-strategy="classic"
. if you want the activatable prop, you should be able to use active-strategy="classic"