* Sets cursor to specified position * * @param cursorPosition - new cursor position
(cursorPosition: number)
| 66 | * @param cursorPosition - new cursor position |
| 67 | */ |
| 68 | public setCursor(cursorPosition: number): void { |
| 69 | if (cursorPosition < this.items.length && cursorPosition >= -1) { |
| 70 | this.dropCursor(); |
| 71 | this.cursor = cursorPosition; |
| 72 | this.items[this.cursor].classList.add(this.focusedCssClass); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Sets items. Can be used when iterable items changed dynamically |
no test coverage detected