* Sets an option as active. * @param index Index of the active option. If set to -1, no option will be active.
(index: number)
| 463 | * @param index Index of the active option. If set to -1, no option will be active. |
| 464 | */ |
| 465 | private _setActiveOption(index: number) { |
| 466 | this._items.forEach((item, itemIndex) => { |
| 467 | let tabindex = -1; |
| 468 | |
| 469 | if (!this.disabled && itemIndex === index) { |
| 470 | tabindex = 0; |
| 471 | } |
| 472 | |
| 473 | item._setTabindex(tabindex); |
| 474 | }); |
| 475 | this._keyManager.updateActiveItem(index); |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * Resets the active option. When the list is disabled, remove all options from to the tab order. |
no test coverage detected