* Resets the active option. When the list is disabled, remove all options from to the tab order. * Otherwise, focus the first selected option.
()
| 464 | * Otherwise, focus the first selected option. |
| 465 | */ |
| 466 | private _resetActiveOption() { |
| 467 | if (this.disabled) { |
| 468 | this._setActiveOption(-1); |
| 469 | return; |
| 470 | } |
| 471 | |
| 472 | const activeItem = |
| 473 | this._items.find(item => item.selected && !item.disabled) || this._items.first; |
| 474 | this._setActiveOption(activeItem ? this._items.toArray().indexOf(activeItem) : -1); |
| 475 | } |
| 476 | |
| 477 | /** Returns whether the focus is currently within the list. */ |
| 478 | private _containsFocus() { |
no test coverage detected