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

Method _updateEndOverflow

packages/main/src/TabContainer.ts:1066–1082  ·  view source on GitHub ↗
(itemsDomRefs: Array<TabInStrip | TabSeparatorInStrip>)

Source from the content-addressed store, hash-verified

1064 }
1065
1066 _updateEndOverflow(itemsDomRefs: Array<TabInStrip | TabSeparatorInStrip>) {
1067 // show end overflow
1068 this._getEndOverflow().removeAttribute("hidden");
1069 const selectedTab = this._getRootTab(this._selectedTab);
1070 const selectedTabDomRef = selectedTab?.getDomRefInStrip() as TabInStrip | undefined;
1071 const containerWidth = this._getTabStrip().offsetWidth;
1072
1073 const selectedItemIndexAndWidth = this._getSelectedItemIndexAndWidth(itemsDomRefs, selectedTabDomRef);
1074 const lastVisibleTabIndex = this._findLastVisibleItem(itemsDomRefs, containerWidth, selectedItemIndexAndWidth.width);
1075
1076 for (let i = lastVisibleTabIndex + 1; i < itemsDomRefs.length; i++) {
1077 itemsDomRefs[i].setAttribute("hidden", "");
1078 itemsDomRefs[i].setAttribute("end-overflow", "");
1079 }
1080
1081 this._endOverflowText = this.overflowButtonText;
1082 }
1083
1084 _updateStartAndEndOverflow(itemsDomRefs: Array<TabInStrip |TabSeparatorInStrip>, firstVisibleIndex?: number) {
1085 let containerWidth = this._getTabStrip().offsetWidth;

Callers 1

_setItemsForStripMethod · 0.95

Calls 6

_getEndOverflowMethod · 0.95
_getRootTabMethod · 0.95
_getTabStripMethod · 0.95
_findLastVisibleItemMethod · 0.95
getDomRefInStripMethod · 0.45

Tested by

no test coverage detected