From 724e8fdce982ebf6dba51ae56cac6a0c87ae3f17 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Wed, 12 Jun 2024 18:59:34 +0200 Subject: [PATCH] Fix lit linting: input-tags should only handle text, not numbers. --- .../common/lib/elements/dynamic-table-form.ts | 1 - client/common/lib/elements/tags-input.ts | 25 ++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/client/common/lib/elements/dynamic-table-form.ts b/client/common/lib/elements/dynamic-table-form.ts index b7999124..376ec8ff 100644 --- a/client/common/lib/elements/dynamic-table-form.ts +++ b/client/common/lib/elements/dynamic-table-form.ts @@ -553,7 +553,6 @@ export class DynamicTableFormElement extends LivechatElement { propertyValue: Array, originalIndex: number): TemplateResult => { return html` + public datalist?: string[] - @property({ reflect: true }) - public value: Array = [] + @property({ reflect: true, type: Array }) + public value: string[] = [] @state() private _searchedTagsIndex: number[] = [] @@ -113,7 +110,7 @@ export class TagsInputElement extends LivechatElement { )} this._handleKeyUp(e)} @input=${(e: InputEvent) => this._handleInputEvent(e)} @change=${(e: Event) => e.stopPropagation()} - .value=${this._inputValue} - .placeholder=${this.inputPlaceholder} /> + .value=${this._inputValue ?? ''} + placeholder=${ifDefined(this.inputPlaceholder)} /> ${(this.datalist) ? html` ${(this.datalist ?? []).map((value) => html`