diff --git a/packages/fiori/src/ShellBar.ts b/packages/fiori/src/ShellBar.ts index a9846f5814ee..2a918463e009 100644 --- a/packages/fiori/src/ShellBar.ts +++ b/packages/fiori/src/ShellBar.ts @@ -48,6 +48,7 @@ import getActiveElement from "@ui5/webcomponents-base/dist/util/getActiveElement import type ShellBarItem from "./ShellBarItem.js"; import type { ShellBarItemAccessibilityAttributes } from "./ShellBarItem.js"; import type ShellBarBranding from "./ShellBarBranding.js"; +import type ShellBarSearch from "./ShellBarSearch.js"; // Templates import ShellBarTemplate from "./ShellBarTemplate.js"; @@ -987,6 +988,13 @@ class ShellBar extends UI5Element { item.classList.add("ui5-shellbar-hidden-button"); } + if (hiddenItems.length === 1) { + return { + itemsInfo: this._itemsInfo, + contentInfo: this._contentInfo, + }; + } + if (hiddenItems.length === 1 && !this.showSearchField) { const nextItemToHide = hidableDomElements[++lastHiddenIndex]; if (nextItemToHide) { diff --git a/packages/fiori/test/pages/ShellBar_content_button_overflow.html b/packages/fiori/test/pages/ShellBar_content_button_overflow.html new file mode 100644 index 000000000000..9795b40b9082 --- /dev/null +++ b/packages/fiori/test/pages/ShellBar_content_button_overflow.html @@ -0,0 +1,288 @@ + + + +
+ +