We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32e1afa commit 913b681Copy full SHA for 913b681
elements/pf-search-input/pf-search-input.ts
@@ -197,7 +197,7 @@ export class PfSearchInput extends LitElement {
197
>
198
<pf-button
199
@click="${this.#OnClose}"
200
- ?hidden="${(!expanded && this._toggleInput?.value.trim() === '')}"
+ ?hidden="${this.#hideCloseButton()}"
201
id="close-button"
202
plain
203
label="Close"
@@ -329,6 +329,13 @@ export class PfSearchInput extends LitElement {
329
this._toggleInput!.value = this.value;
330
this.#combobox.selected = [];
331
}
332
+
333
+ #hideCloseButton() {
334
+ if (!isServer) {
335
+ return !this.expanded && this._toggleInput?.value.trim() === ''; // SSR or server-side environment: don't hide the element
336
+ }
337
+ return false;
338
339
340
341
declare global {
0 commit comments