mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 11:56:34 +00:00
Fix-ha-form-float-validate (#23751)
* Use autoCaseNoun for domainName * Fix ha-form-float validate * Revert "Use autoCaseNoun for domainName" This reverts commit ff6855149b799665ae27b8b2a81b4545435a953c.
This commit is contained in:
parent
7960da1872
commit
e54f178b02
@ -36,7 +36,7 @@ export class HaFormFloat extends LitElement implements HaFormElement {
|
|||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<ha-textfield
|
<ha-textfield
|
||||||
type="numeric"
|
type="number"
|
||||||
inputMode="decimal"
|
inputMode="decimal"
|
||||||
.label=${this.label}
|
.label=${this.label}
|
||||||
.helper=${this.helper}
|
.helper=${this.helper}
|
||||||
@ -84,11 +84,6 @@ export class HaFormFloat extends LitElement implements HaFormElement {
|
|||||||
|
|
||||||
// Detect anything changed
|
// Detect anything changed
|
||||||
if (this.data === value) {
|
if (this.data === value) {
|
||||||
// parseFloat will drop invalid text at the end, in that case update textfield
|
|
||||||
const newRawValue = value === undefined ? "" : String(value);
|
|
||||||
if (source.value !== newRawValue) {
|
|
||||||
source.value = newRawValue;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user