MCPcopy Create free account
hub / github.com/UI5/webcomponents / setSelectedGroup

Method setSelectedGroup

packages/base/src/features/F6Navigation.ts:211–220  ·  view source on GitHub ↗
(root: DocumentOrShadowRoot = window.document)

Source from the content-addressed store, hash-verified

209 }
210
211 setSelectedGroup(root: DocumentOrShadowRoot = window.document) {
212 const htmlElement = window.document.querySelector("html");
213 let element: Element | null = this.deepActive(root);
214
215 while (element && element.getAttribute("data-sap-ui-fastnavgroup") !== "true" && element !== htmlElement) {
216 element = getParentElement(element);
217 }
218
219 this.selectedGroup = element as HTMLElement;
220 }
221
222 deepActive(root: DocumentOrShadowRoot): Element | null {
223 if (root?.activeElement?.shadowRoot?.activeElement) {

Callers 1

updateGroupsMethod · 0.95

Calls 2

deepActiveMethod · 0.95
getParentElementFunction · 0.85

Tested by

no test coverage detected