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] v-treeview UI doesnt update correctly when selecting/deselecting identical objects #12286

Closed
TJBrunson opened this issue Sep 25, 2020 · 7 comments
Assignees
Labels
invalid The issue is missing information or is not a valid bug/feature request

Comments

@TJBrunson
Copy link

Environment

Vuetify Version: 2.3.10
Vue Version: 3.0.0
Browsers: Chrome 85.0.4183.121
OS: Mac OS 10.15.6

Steps to reproduce

Make a selectable tree view with the "vaccine" data object in the JSFiddle provided. Play with selecting different rows. For instance, selected the first instance of "2008-2009 trivalent influenza vaccine". Both instances will become selected as expected and the v-model is updated accordingly. Then try to deselect the second instance of "2008-2009 trivalent influenza vaccine" and notice the first instance is not de-selected, but the v-model is updated correctly. Seems like a UI bug that doesn't re-render all checkboxes correctly. This issue is present in Chrome, Brave, and Safari. I have not checked other browsers.

Expected Behavior

When identical objects are present in different parts of the hierarchy, selecting and deselecting one of them should update the ui for every instance of the object.

Actual Behavior

When selecting the first instance of an object, all other instances of the object become selected. Then, when deselecting a later instance of the object, previous instances are not de-selected.

Reproduction Link

https://jsfiddle.net/hugbtknz/

@ghost ghost added the S: triage label Sep 25, 2020
@nekosaur nekosaur added the S: needs reproduction The issue does not contain a valid reproduction label Oct 4, 2020
@nekosaur
Copy link
Member

nekosaur commented Oct 4, 2020

The fiddle does not work

@TJBrunson
Copy link
Author

Yeah, for some reason fiddle doesn't recognize the v-treeview component. This should be everything required to replicate it in a dev environment. I just have no experience with JSFiddle, so I don't know how to correctly include the component. Vuetify does it automatically in the dev environment.

@nekosaur
Copy link
Member

nekosaur commented Oct 5, 2020

@TJBrunson
Copy link
Author

@jacekkarczmarczyk jacekkarczmarczyk removed the S: needs reproduction The issue does not contain a valid reproduction label Oct 5, 2020
@johnleider
Copy link
Member

Leaves must have a unique ID. Removing the dup values solves the issue: https://codepen.io/johnjleider/pen/MWeWGjm

This Pull Request is being closed due to inactivity.

If you have any additional questions, please reach out to us in our Discord community.

@johnleider johnleider added invalid The issue is missing information or is not a valid bug/feature request and removed S: triage labels Oct 7, 2020
@johnleider johnleider self-assigned this Oct 7, 2020
@TJBrunson
Copy link
Author

Sure, thats one way to solve the problem, but what about trees like mine where objects can be duplicated? It's a real world use case that people may run into. Shouldn't it be supported?

@johnleider
Copy link
Member

We have multiple areas of the framework that are similar in nature that won't support duplicate id's; e.g. v-data-table, v-select. This creates a side effect of sorts where similar functionality is different between components.

Thank you for your feedback. I'm going to close this conversation and you are welcome to join Discord if you want to discuss further.

@vuetifyjs vuetifyjs locked as resolved and limited conversation to collaborators Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid The issue is missing information or is not a valid bug/feature request
Projects
None yet
Development

No branches or pull requests

4 participants