use the correct inputmode (#13722)

This commit is contained in:
Bram Kragten 2022-09-13 20:53:19 +02:00
parent 55d84973c6
commit f164ad0b89
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B

View File

@ -51,8 +51,9 @@ export class HaNumberSelector extends LitElement {
` `
: ""} : ""}
<ha-textfield <ha-textfield
inputMode="numeric" .inputMode=${(this.selector.number.step || 1) % 1 !== 0
pattern="[0-9]+([\\.][0-9]+)?" ? "decimal"
: "numeric"}
.label=${this.selector.number.mode !== "box" ? undefined : this.label} .label=${this.selector.number.mode !== "box" ? undefined : this.label}
.placeholder=${this.placeholder} .placeholder=${this.placeholder}
class=${classMap({ single: this.selector.number.mode === "box" })} class=${classMap({ single: this.selector.number.mode === "box" })}