You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/api-generator/src/locale/en/VList.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
"lines": "Designates a **minimum-height** for all children `v-list-item` components. This prop uses [line-clamp](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp) and is not supported in all browsers.",
11
11
"link": "Applies `v-list-item` hover styles. Useful when using the item is an _activator_.",
12
12
"nav": "An alternative styling that reduces `v-list-item` width and rounds the corners. Typically used with **[v-navigation-drawer](/components/navigation-drawers)**.",
13
+
"navigationIndex": "Specifies the currently selected navigation index when using `navigationStrategy=\"track\"`. Can be used with `v-model:navigationIndex` for two-way binding. Items at this index receive visual keyboard focus styling and automatic scrolling. Note: Only works with the `items` prop, not with slotted items.",
14
+
"navigationStrategy": "Determines keyboard navigation behavior. **focus** (default) moves DOM focus to items, suitable for traditional lists. **track** provides visual keyboard focus without moving DOM focus, ideal for command palettes and autocomplete where an external element retains focus. When track mode is active, items automatically receive `tabindex=\"-1\"`, proper `aria-activedescendant` is set on the list container, and keyboard-focused items display focus-visible styling with auto-scrolling.",
13
15
"subheader": "Removes the top padding from `v-list-subheader` components. When used as a **String**, renders a subheader for you.",
14
16
"slim": "Reduces horizontal spacing for badges, icons, tooltips, and avatars within slim list items to create a more compact visual representation.",
15
17
"prependGap": "Sets the horizontal spacing between prepend slot and the main content within list item. Also affects indent to ensure expected alignment of group children.",
@@ -23,6 +25,7 @@
23
25
"click:open": "Emitted when the list item is opened.",
24
26
"click:select": "Emitted when the list item is selected.",
25
27
"update:activated": "Emitted when the list item is activated.",
28
+
"update:navigationIndex": "Emitted when keyboard navigation occurs in `navigationStrategy=\"track\"`. The event payload is the new index of the selected item. Automatically skips non-selectable items like dividers and subheaders.",
26
29
"update:opened": "Emitted when the list item is opened.",
27
30
"update:selected": "Emitted when the list item is selected."
28
31
},
@@ -39,6 +42,7 @@
39
42
"children": "The nested list items within the component.",
40
43
"focus": "Focus the list item.",
41
44
"getPath": "Get the position of an item within the nested structure.",
45
+
"navigationIndex": "A computed ref that returns the current navigation index when using `navigationStrategy=\"track\"`. Returns -1 when no item is selected or when using `navigationStrategy=\"focus\"`.",
42
46
"open": "Open the list item.",
43
47
"parents": "The parent list items within the component."
Copy file name to clipboardExpand all lines: packages/api-generator/src/locale/en/VListItem.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@
8
8
"value": "The value used for selection. Obtained from [`v-list`](/api/v-list)'s `v-model:selected` when the item is selected.",
9
9
"lines": "The line declaration specifies the minimum height of the item and can also be controlled from v-list with the same prop.",
10
10
"nav": "Reduces the width v-list-item takes up as well as adding a border radius.",
11
-
"slim": "Reduces horizontal spacing for badges, icons, tooltips, and avatars to create a more compact visual representation."
11
+
"slim": "Reduces horizontal spacing for badges, icons, tooltips, and avatars to create a more compact visual representation.",
12
+
"tabindex": "Controls the tabindex of the list item. When set, overrides the default tabindex behavior. Automatically set to -1 by VList when using `navigationStrategy=\"track\"` to prevent Tab key navigation into items."
Copy file name to clipboardExpand all lines: packages/api-generator/src/locale/en/nested.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,6 @@
5
5
"opened": "An array containing the values of currently opened groups. Can be two-way bound with `v-model:opened`.",
6
6
"openStrategy": "Affects how items with children behave when expanded.\n- **multiple:** Any number of groups can be open at once.\n- **single:** Only one group at each level can be open, opening a group will cause others to close.\n- **list:** Multiple, but all other groups will close when an item is selected.",
7
7
"selected": "An array containing the values of currently selected items. Can be two-way bound with `v-model:selected`.",
8
-
"selectStrategy": "Affects how items with children behave when selected.\n- **leaf:** Only leaf nodes (items without children) can be selected.\n- **independent:** All nodes can be selected whether they have children or not.\n- **classic:** Selecting a parent node will cause all children to be selected, parent nodes will be displayed as selected if all their descendants are selected. Only leaf nodes will be added to the model.\n- **trunk**: Same as classic but if all of a node's children are selected then only that node will be added to the model."
8
+
"selectStrategy": "Affects how items with children behave when selected.\n- **leaf:** Only leaf nodes (items without children) can be selected.\n- **independent:** All nodes can be selected whether they have children or not.\n- **classic:** Selecting a parent node will cause all children to be selected, parent nodes will be displayed as selected if all their descendants are selected. Only leaf nodes will be added to the model.\n- **trunk**: Same as classic but if all of a node's children are selected then only that node will be added to the model.\n- **branch**: Same as classic but if any of a node's children are selected then that node will also be added to the model."
Copy file name to clipboardExpand all lines: packages/docs/src/pages/en/components/treeview.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,16 @@ You can control the color of the selected node checkbox.
112
112
113
113
#### Selection type
114
114
115
-
Treeview now supports two different selection types. The default type is **'leaf'**, which will only include leaf nodes in the v-model array, but will render parent nodes as either partially or fully selected. The alternative mode is **'independent'**, which allows one to select parent nodes, but each node is independent of its parent and children.
115
+
Treeview supports several selection modes:
116
+
117
+
-**leaf** (default): Limits selection to items without children.
118
+
-**independent**: Lets you select any node, with no parent-child linkage at all.
119
+
-**classic**: Selecting a parent selects all descendants, and parent nodes show as selected only when all their descendants are selected. Only leaf nodes are added to the model.
120
+
121
+
Classic has two variants that are displayed the same way but with slightly different v-model behavior:
122
+
123
+
-**branch**: Any parent node with at least one selected descendant is also added to the model.
124
+
-**trunk**: If all children are selected only the parent node is added to the model.
0 commit comments