Collapses the active item if possible, otherwise navigates to the parent.
(opts?: SelectOptions)
| 469 | |
| 470 | /** Collapses the active item if possible, otherwise navigates to the parent. */ |
| 471 | _collapseOrParent(opts?: SelectOptions) { |
| 472 | const item = this.treeBehavior.inputs.activeItem(); |
| 473 | if (item && this.treeBehavior.isExpandable(item) && item.expanded()) { |
| 474 | this.treeBehavior.collapse(item); |
| 475 | } else { |
| 476 | this.treeBehavior.parent(opts); |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | /** Retrieves the TreeItemPattern associated with a DOM event, if any. */ |
| 481 | protected _getItem(event: Event): TreeItemPattern<V> | undefined { |
no test coverage detected