From 4a6c37ae0c7f98c9e90a1e928af8f4a922bf80cb Mon Sep 17 00:00:00 2001 From: Buni48 Date: Sun, 19 Jun 2022 18:22:52 +0200 Subject: [PATCH] Fixes #793 --- src/components/input/input.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/input/input.ts b/src/components/input/input.ts index 4250b4c4b..ba21ae2bd 100644 --- a/src/components/input/input.ts +++ b/src/components/input/input.ts @@ -299,7 +299,8 @@ export default class SlInput extends LitElement { const hasHelpTextSlot = this.hasSlotController.test('help-text'); const hasLabel = this.label ? true : !!hasLabelSlot; const hasHelpText = this.helpText ? true : !!hasHelpTextSlot; - const hasClearIcon = this.clearable && !this.disabled && !this.readonly && this.value.length > 0; + const hasClearIcon = + this.clearable && !this.disabled && !this.readonly && (typeof this.value === 'number' || this.value.length > 0); return html`