vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.5.13] VTreeView Select Functionality (Prepend slot, selectable prop v-model value, click:select event)

Open angrymarker opened this issue 10 months ago • 4 comments

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

angrymarker avatar Apr 02 '24 20:04 angrymarker

Would be awesome if you could help test PR #19795, this is what I fixed so far

vuetify-tree-select-4

yuwu9145 avatar May 17 '24 03:05 yuwu9145

The return object prop does not seem to be working, and is returning the object keys

angrymarker avatar May 20 '24 20:05 angrymarker

@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 image

angrymarker avatar May 20 '24 20:05 angrymarker

@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

yuwu9145 avatar May 22 '24 11:05 yuwu9145

i'm also unsure how you got the prepend slot next to the items with children and the down arrow. Checkbox as well image

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"

angrymarker avatar May 30 '24 21:05 angrymarker