Skip to content

Commit 1279639

Browse files
authored
refactor(ui5-shellbar): rename property disableAutoSearchField (#11444)
1 parent 68b18d3 commit 1279639

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/fiori/src/ShellBar.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,12 @@ class ShellBar extends UI5Element {
316316
/**
317317
* Disables the automatic search field expansion/collapse when the available space is not enough.
318318
*
319-
* **Note:** The `disableAutoSearchField` property is in an experimental state and is a subject to change.
319+
* **Note:** The `disableSearchCollapse` property is in an experimental state and is a subject to change.
320320
* @default false
321321
* @public
322322
*/
323323
@property({ type: Boolean })
324-
disableAutoSearchField = false;
324+
disableSearchCollapse = false;
325325

326326
/**
327327
* Defines the `primaryTitle`.
@@ -1276,8 +1276,8 @@ class ShellBar extends UI5Element {
12761276
get autoSearchField() {
12771277
const onFocus = document.activeElement === this.searchField[0];
12781278
const hasValue = this.searchField[0]?.value?.length > 0;
1279-
const disableAutoSearchField = this.disableAutoSearchField || onFocus || hasValue;
1280-
if (disableAutoSearchField) {
1279+
const disableSearchCollapse = this.disableSearchCollapse || onFocus || hasValue;
1280+
if (disableSearchCollapse) {
12811281
return false;
12821282
}
12831283
return this.showSearchField || this._autoRestoreSearchField;

packages/fiori/test/pages/ShellBar_evolution.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290

291291
["focus", "blur", "input"].forEach((event) => {
292292
customSearchInput.addEventListener(event, () => {
293-
shellbar_hide_search.disableAutoSearchField =
293+
shellbar_hide_search.disableSearchCollapse =
294294
customSearchInput.value || customSearchInput === document.activeElement;
295295
});
296296
});

0 commit comments

Comments
 (0)