Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions packages/fiori/src/themes/SearchField.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,24 @@
/* scope select */
[ui5-select] {
outline: none;
margin: var(--_ui5_search_input_scope_margin);
max-width: 10rem;
margin: 0 0.25rem;
width: fit-content;
min-width: auto;
max-width: 18rem;
flex: 0 1 auto;
border-radius: var(--_ui5_search_input_border_radius);
border: var(--_ui5-search-border);
box-shadow: none;
background: unset;
background-color: var(--_ui5-search-elements-background);
height: var(--_ui5-search-select-height);
--_ui5_select_label_color: var(--sapShell_TextColor);
background: none;
height: 1.75rem;
--_ui5_select_label_color: var(--sapField_TextColor);
}

.ui5-search-field-content [ui5-select]::part(label) {
padding-inline-end: 0.25rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

[ui5-select]:hover {
Expand Down
13 changes: 13 additions & 0 deletions packages/fiori/test/pages/Search.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,17 @@
<ui5-text style="padding-top: 0.25rem; font-style: italic;">The examples shows scoped search with scoped suggestions. Change scope to filter suggestions.</ui5-text>
</div>

<div class="container">
<ui5-label>Search with long Scoped Suggestions</ui5-label>
<ui5-search id="long-scope" show-clear-icon scope-value="apps" placeholder="Search Apps, Products">
<ui5-search-scope text="All" value="all" slot="scopes"></ui5-search-scope>
<ui5-search-scope text="Very very very long scope text" value="apps" slot="scopes"></ui5-search-scope>
<ui5-search-scope text="Very very very very very very very very very very very long scope text" value="products" slot="scopes"></ui5-search-scope>
<ui5-search-scope text="Very very very very very very very very very very very very very very very very long scope text" value="products" slot="scopes"></ui5-search-scope>
</ui5-search>
<ui5-text style="padding-top: 0.25rem; font-style: italic;">This example demonstrates scope adaptive width behavior.</ui5-text>
</div>


<div class="container">
<ui5-label>Search with Suggestions - Filters and noTypeAhead</ui5-label>
Expand Down Expand Up @@ -312,6 +323,8 @@
{ name: 'Manage Products', scope: 'apps' },
{ name: 'Mobile Phones', scope: 'products' },
{ name: 'Tablet', scope: 'products' },
{ name: 'Long Scope', scope: 'long' },
{ name: 'Very long scope', scope: 'long' },
];

function createScopeItems(scope) {
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/SelectTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function SelectTemplate(this: Select) {

<div
class="ui5-select-label-root"
part="label"
data-sap-focus-ref
tabindex={this._effectiveTabIndex}
role="combobox"
Expand Down
Loading