Summary
<ui5-search> renders an inner <ui5-select> for the scope dropdown, but the element is not exposed as a CSS part. This makes it impossible to style the scope select from outside the component using the standard ::part() mechanism.
Current behaviour
The scope select is hard-coded with max-width: 10rem (160 px) inside the <ui5-search> shadow root:
/* inside ui5-search shadow root — adoptedStyleSheets */
[ui5-select] {
max-width: 10rem;
...
}
Additionally, .ui5-select-label-root inside the <ui5-select> shadow root has overflow: hidden; text-overflow: ellipsis, so any label text longer than ~160 px is truncated with no way to override it through the public API.
Expected behaviour
<ui5-select> inside <ui5-search> is exposed as a named CSS part (e.g. part="scope-select"), allowing host applications to write:
ui5-search::part(scope-select) {
max-width: none;
min-width: fit-content;
}
Workaround
Currently the only reliable workaround is imperative DOM patching through nested shadow roots at runtime, which is fragile and breaks encapsulation:
const ui5Select = ui5Search.shadowRoot?.querySelector('ui5-select') as HTMLElement;
ui5Select.style.maxWidth = 'none';
ui5Select.style.minWidth = 'fit-content';
const label = ui5Select.shadowRoot?.querySelector('.ui5-select-label-root') as HTMLElement;
label.style.overflow = 'visible';
label.style.textOverflow = 'clip';
Use case
Scope labels such as "My Contributions" or any other localised string longer than ~11 characters are visually truncated even when there is ample space available in the toolbar. This is a real UX regression for applications that use <ui5-search> with named scopes.
Environment
@ui5/webcomponents-fiori version: 2.22.0
- Browser: Chrome 149
Summary
<ui5-search>renders an inner<ui5-select>for the scope dropdown, but the element is not exposed as a CSS part. This makes it impossible to style the scope select from outside the component using the standard::part()mechanism.Current behaviour
The scope select is hard-coded with
max-width: 10rem(160 px) inside the<ui5-search>shadow root:Additionally,
.ui5-select-label-rootinside the<ui5-select>shadow root hasoverflow: hidden; text-overflow: ellipsis, so any label text longer than ~160 px is truncated with no way to override it through the public API.Expected behaviour
<ui5-select>inside<ui5-search>is exposed as a named CSS part (e.g.part="scope-select"), allowing host applications to write:Workaround
Currently the only reliable workaround is imperative DOM patching through nested shadow roots at runtime, which is fragile and breaks encapsulation:
Use case
Scope labels such as "My Contributions" or any other localised string longer than ~11 characters are visually truncated even when there is ample space available in the toolbar. This is a real UX regression for applications that use
<ui5-search>with named scopes.Environment
@ui5/webcomponents-fioriversion: 2.22.0