This commit is contained in:
Buni48
2022-06-19 18:22:52 +02:00
parent f1bfd58dd2
commit 4a6c37ae0c

View File

@@ -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`
<div