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: README.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,14 @@ A mandatory attribute `name` is used by the `<cbx-tree>` component to construct
185
185
<cbx-treename="reading-list[]"></cbx-tree>
186
186
```
187
187
188
+
### `nohover`
189
+
190
+
By default, items in the `<cbx-tree>` component grab focus and get highlighted when pointer hovers over them, similarly to options in the `<select>` element’s dropdown. A Boolean attribute `nohover` makes the `<cbx-tree>` component deactivate this behaviour, so that items only become selected when clicked or focused by keyboard navigation (similarly to options in a `<select>` with the `multiple` attribute specified).
191
+
192
+
```html
193
+
<cbx-treename="reading-list[]"nohover></cbx-tree>
194
+
```
195
+
188
196
## Instance properties
189
197
190
198
The `CbxTree` interface also inherits properties from its parent, [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement).
Reflects the value of the element’s [`name` attribute](#name).
214
222
223
+
### `CbxTree.noHover`
224
+
225
+
Reflects the value of the element’s [`nohover` attribute](#nohover).
226
+
215
227
### `CbxTree.subtreeProvider`
216
228
217
229
The `subtreeProvider` property is used in cases where on-demand subtree loading is required. If your initial tree doesn’t contain data for some nested subtrees, you may define your custom function for subtree generation/fetching which will be called when the user expands the target item for the first time.
@@ -317,8 +329,8 @@ The `<cbx-tree>` element provides a few CSS custom properties (variables) that y
317
329
|`--cbx-tree-toggle-closed-mask`|`<url>`¹ | Mask image for the toggle button in the collapsed state |
318
330
|`--cbx-tree-toggle-open-mask`|`<url>`| Mask image for the toggle button in the expanded state |
319
331
|`--cbx-tree-toggle-pending-mask`|`<url>`| Mask image for the toggle button in the pending state |
320
-
|`--cbx-tree-label-hover-bg`|`<color>`² | Background color for the highlighted item’s label |
321
-
|`--cbx-tree-label-hover-fg`|`<color>`| Text color for the highlighted item’s label |
332
+
|`--cbx-tree-label-focus-bg`|`<color>`² | Background color for the highlighted item’s label |
333
+
|`--cbx-tree-label-focus-fg`|`<color>`| Text color for the highlighted item’s label |
322
334
|`--cbx-tree-nesting-indent`|`<length>`³ | Indentation size for nested subtrees |
0 commit comments