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

Method getFocusedElementType

packages/compat/src/Table.ts:742–755  ·  view source on GitHub ↗

* Determines the type of the currently focused element. * @private

(element: HTMLElement)

Source from the content-addressed store, hash-verified

740 * @private
741 */
742 getFocusedElementType(element: HTMLElement): TableFocusTargetElement | undefined {
743 if (element === this.columnHeader) {
744 return TableFocusTargetElement.ColumnHeader;
745 }
746
747 if (element === this.morеBtn) {
748 return TableFocusTargetElement.MoreButton;
749 }
750
751 if (this.rows.includes(element as ITableRow)) {
752 const isGroupRow = element.hasAttribute("ui5-table-group-row");
753 return isGroupRow ? TableFocusTargetElement.GroupRow : TableFocusTargetElement.Row;
754 }
755 }
756
757 /**
758 * Toggles focus between the table row's root and the last focused nested element.

Callers 2

_handleTabMethod · 0.95
_handleArrowAltMethod · 0.95

Calls 1

hasAttributeMethod · 0.80

Tested by

no test coverage detected