From 74179fdfc7ba4e449edd338095a7b6552a6bfaba Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Thu, 11 Apr 2024 14:16:54 +0300 Subject: [PATCH] fix(select): presence of placeholder in ax tree --- elements/pf-select/pf-option.ts | 2 +- elements/pf-select/pf-select.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/pf-select/pf-option.ts b/elements/pf-select/pf-option.ts index d616d24797..fa46a164e3 100644 --- a/elements/pf-select/pf-option.ts +++ b/elements/pf-select/pf-option.ts @@ -28,7 +28,7 @@ export class PfOption extends LitElement { /** form value for this option */ @property({ reflect: true }) get value() { - return this.#value ?? this.textContent ?? ''; + return (this.#value ?? this.textContent ?? '').trim(); } set value(v: string) { diff --git a/elements/pf-select/pf-select.ts b/elements/pf-select/pf-select.ts index 29aa901167..8b1a265ab2 100644 --- a/elements/pf-select/pf-select.ts +++ b/elements/pf-select/pf-select.ts @@ -290,7 +290,7 @@ export class PfSelect extends LitElement { class="${classMap({ checkboxes })}"> ${this.placeholder}