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.7.6] VTreeView: isOpen slot prop is always equals to false in prepend and append slots if return-object is specified #20830

Open
b-maslennikov opened this issue Jan 3, 2025 · 3 comments
Labels
C: VTreeview VTreeview labs T: bug Functionality that does not work as intended/expected

Comments

@b-maslennikov
Copy link

Environment

Vuetify Version: 3.7.6
Vue Version: 3.5.13
Browsers: Google Chrome, Mozilla Firefox, Microsoft Edge
OS: Windows

Steps to reproduce

  • Add v-treeview with open-on-click prop
  • Add prepend or append slot with isOpen prop

Expected Behavior

isOpen value should be changed when toggle (open/close) the node

Actual Behavior

isOpen value is always equals to false

Reproduction Link

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

@b-maslennikov
Copy link
Author

b-maslennikov commented Jan 3, 2025

It works in this example utill I add return-object

@MatthewAry
Copy link
Contributor

Hi there, I don't think this is the bug you think it is. I made a change to your reproduction. and by specifying what the item-value is, we're able to get the proper isOpen state from the component. However, I do think there is a bug with getting the isOpen state when using the return-object prop. Normally I would expect that you would have to define a custom value-comparator so the component would be able to properly distinguish different objects, but I wasn't able to get it to work. but perhaps I wasn't doing it correctly? Anyways. I will mark this as a bug because it seems broken to me when using return-object

@MatthewAry MatthewAry added T: bug Functionality that does not work as intended/expected C: VTreeview VTreeview labs labels Jan 7, 2025
@github-actions github-actions bot removed the S: triage label Jan 7, 2025
@b-maslennikov
Copy link
Author

b-maslennikov commented Jan 7, 2025

hah. thanks. originally I had return-object in my code. so that's the problem I have.

@b-maslennikov b-maslennikov changed the title [Bug Report][3.7.6] VTreeView: isOpen slot prop is always equals to false in prepend and append slots [Bug Report][3.7.6] VTreeView: isOpen slot prop is always equals to false in prepend and append slots if return-object is specified Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VTreeview VTreeview labs T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants