(e: KeyboardEvent)
| 194 | } |
| 195 | |
| 196 | _onkeydown(e: KeyboardEvent) { |
| 197 | if (!this._table || !e.shiftKey) { |
| 198 | return; |
| 199 | } |
| 200 | |
| 201 | const focusedElement = getActiveElement(); // Assumption: The focused element is always the "next" row after navigation. |
| 202 | |
| 203 | if (!(focusedElement?.hasAttribute("ui5-table-row") || this._rangeSelection?.isMouse)) { |
| 204 | this._stopRangeSelection(); |
| 205 | return; |
| 206 | } |
| 207 | |
| 208 | if (!this._rangeSelection) { |
| 209 | // If no range selection is active, start one |
| 210 | const row = focusedElement as TableRow; |
| 211 | this._startRangeSelection(row, this.isSelected(row)); |
| 212 | } else if (e.key === "ArrowUp" || e.key === "ArrowDown") { |
| 213 | const change = isUpShift(e) ? -1 : 1; |
| 214 | this._handleRangeSelection(focusedElement as TableRow, change); |
| 215 | } |
| 216 | |
| 217 | if (this._rangeSelection) { |
| 218 | this._rangeSelection.shiftPressed = e.shiftKey; |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | _onkeyup(e: KeyboardEvent, eventOrigin: HTMLElement) { |
| 223 | if (!this._table) { |
nothing calls this directly
no test coverage detected