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

[Feature Request] Treeview: Determine what element is being hovered over #20333

Open
ConnorNoddin opened this issue Aug 14, 2024 · 1 comment

Comments

@ConnorNoddin
Copy link

Problem to solve

I am trying to implement some custom functionality in my program based off what element in the tree I am hovering over. While I can easily tell what item has been selected, I can not seem to find a way to determine what individual element is being hovered over.

Proposed solution

VTreeview has activated which is an array of ids of activated nodes. All that is needed is something like "hovered" which is an array of ids of hovered over node(s). This probably doesn't need to be an array and can just be a single element.

@J-Sek
Copy link
Contributor

J-Sek commented Aug 28, 2024

Depending on the use case, you can either wrap every item in v-hover or set @mouseenter on items and @mouseleave on the container.

If only VTreeView would apply #item slot to the expandable nodes as well, the example 1 would be fully functional.

Passing onMouseenter via item-props works better - example 2 - but, you need to re-apply it when using #item slot as it does not get passed to its binding props.

--
I wonder if combining both counts for calling it a supported feature... 🤔 with the exception of inability to wrap whole node item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants