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

Method _setCurrentItem

packages/main/src/TableNavigation.ts:76–83  ·  view source on GitHub ↗
(e: Event, callback?: (currentItem: HTMLElement) => void)

Source from the content-addressed store, hash-verified

74 }
75
76 _setCurrentItem(e: Event, callback?: (currentItem: HTMLElement) => void) {
77 const navigationItems = this._getNavigationItemsOfGrid().flat();
78 const navigationItem = e.composedPath().find(target => navigationItems.includes(target as HTMLElement)) as HTMLElement;
79 if (navigationItem) {
80 this._gridWalker.setCurrent(navigationItem);
81 callback && callback(navigationItem);
82 }
83 }
84
85 _isEventFromCurrentItem(e: Event) {
86 return e.composedPath()[0] === this._gridWalker.getCurrent();

Callers 3

_handleF2Method · 0.95
_handleF7Method · 0.95
_handleArrowUpDownMethod · 0.95

Calls 3

callbackFunction · 0.85
setCurrentMethod · 0.80

Tested by

no test coverage detected