[Feature Request] Treeview - force at least one node active
See original GitHub issueProblem to solve
I would like to force the user to have at least one treeview node active. User should not be able to deactivate active node. For v-list-group
we have mandatory
prop which does exactly this.
Proposed solution
Add new prop mandatory-active
for treeview. When this prop is true, at least one treeview node must be active -> similar behavior to mandatory
prop in v-list-group
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TreeView Class (System.Windows.Forms) | Microsoft Learn
Displays a hierarchical collection of labeled items, each represented by a TreeNode.
Read more >Java TreeView User's Manual - SourceForge
Any operation which selects genes in one view, either due to genome ordering, hierarchical clustering, or per-gene statistics, selects the genes in all...
Read more >Tree View | APG | WAI - W3C
A tree view widget presents a hierarchical list. Any item in the hierarchy may have child items, and items that have children may...
Read more >Tree View Tutorial - GTK Documentation
A tree view column needs to contain at least one cell renderer, but can contain multiple cell renderers. For example, if one wanted...
Read more >Tree view | Interface guidelines - Primer Design System
If a user expands nested parent nodes and then collapses a parent node higher in the hierarchy, persist the expanded parent nodes lower...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1
In one of my projects, I use
v-treeview
for site navigation, where every leaf is a link to a component. I can get the active leaf using@update:active
which produces an array of active leaves and then I grab the first one. However, if I click on the same leaf again, it deactivates it, so the resulting array of@update:active
is empty. Of course, I can handle a case like that, but it still messes up my css, as that leaf element drops itsv-treeview-node--active
class.A simple case like that requires lots of manual work, so having an out-of-the-box feature like this would be very helpful!
@escapedcat This is not a solution. I want to force the user to have at least one treeview node active. Your proposition is not related to
active
state and it does not work. Error message is not a solution.