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.5.13] VTreeView Select Functionality (Prepend slot, selectable prop v-model value, click:select event) #19533

Closed
angrymarker opened this issue Apr 2, 2024 · 5 comments · Fixed by #19795
Assignees
Labels
C: VTreeview VTreeview T: bug Functionality that does not work as intended/expected

Comments

@angrymarker
Copy link

angrymarker commented Apr 2, 2024

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

@yuwu9145 yuwu9145 added T: bug Functionality that does not work as intended/expected C: VTreeview VTreeview and removed S: triage labels May 13, 2024
@yuwu9145 yuwu9145 self-assigned this May 17, 2024
@yuwu9145
Copy link
Member

yuwu9145 commented May 17, 2024

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

vuetify-tree-select-4

@angrymarker
Copy link
Author

angrymarker commented May 20, 2024

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

@angrymarker
Copy link
Author

angrymarker commented May 20, 2024

@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

@yuwu9145
Copy link
Member

yuwu9145 commented May 22, 2024

@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

@angrymarker
Copy link
Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VTreeview VTreeview T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants