MCPcopy Index your code
hub / github.com/UI5/webcomponents / _onListHeaderKeydown

Method _onListHeaderKeydown

packages/main/src/MultiComboBox.ts:1167–1193  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

1165 }
1166
1167 _onListHeaderKeydown(e: KeyboardEvent) {
1168 const isArrowDown = isDown(e);
1169 const isArrowUp = isUp(e);
1170 const isSelectAllFocused = (e.target as HTMLElement).classList.contains("ui5-mcb-select-all-checkbox");
1171
1172 if (isTabNext(e) || isTabPrevious(e)) {
1173 this._onItemTab();
1174 return;
1175 }
1176
1177 e.preventDefault();
1178
1179 if (isArrowDown || isDownCtrl(e)) {
1180 if (this.showSelectAll && !isSelectAllFocused) {
1181 return (this._getResponsivePopover().querySelector(".ui5-mcb-select-all-checkbox") as CheckBox).focus();
1182 }
1183
1184 this._handleArrowDown();
1185 }
1186
1187 if (isArrowUp || isUpCtrl(e)) {
1188 if (e.target === this.valueStateHeader || (this.showSelectAll && isSelectAllFocused)) {
1189 this._shouldAutocomplete = true;
1190 return this._inputDom.focus();
1191 }
1192 }
1193 }
1194
1195 _handleSelectAllCheckboxClick(e: CustomEvent) {
1196 if (!this.filterSelected) {

Callers

nothing calls this directly

Calls 11

_onItemTabMethod · 0.95
_getResponsivePopoverMethod · 0.95
_handleArrowDownMethod · 0.95
isDownFunction · 0.85
isUpFunction · 0.85
isTabNextFunction · 0.85
isTabPreviousFunction · 0.85
isDownCtrlFunction · 0.85
isUpCtrlFunction · 0.85
containsMethod · 0.80
focusMethod · 0.45

Tested by

no test coverage detected