mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Pass helper to ha-form subtypes (#14165)
This commit is contained in:
parent
62ac9155fc
commit
ab1b778439
@ -11,7 +11,9 @@ export class HaFormFloat extends LitElement implements HaFormElement {
|
||||
|
||||
@property({ attribute: false }) public data!: HaFormFloatData;
|
||||
|
||||
@property() public label!: string;
|
||||
@property() public label?: string;
|
||||
|
||||
@property() public helper?: string;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
@ -29,6 +31,8 @@ export class HaFormFloat extends LitElement implements HaFormElement {
|
||||
type="numeric"
|
||||
inputMode="decimal"
|
||||
.label=${this.label}
|
||||
.helper=${this.helper}
|
||||
helperPersistent
|
||||
.value=${this.data !== undefined ? this.data : ""}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.schema.required}
|
||||
|
@ -21,6 +21,8 @@ export class HaFormInteger extends LitElement implements HaFormElement {
|
||||
|
||||
@property() public label?: string;
|
||||
|
||||
@property() public helper?: string;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
@query("ha-textfield ha-slider") private _input?:
|
||||
@ -74,6 +76,8 @@ export class HaFormInteger extends LitElement implements HaFormElement {
|
||||
type="number"
|
||||
inputMode="numeric"
|
||||
.label=${this.label}
|
||||
.helper=${this.helper}
|
||||
helperPersistent
|
||||
.value=${this.data !== undefined ? this.data : ""}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.schema.required}
|
||||
|
@ -19,7 +19,9 @@ export class HaFormSelect extends LitElement implements HaFormElement {
|
||||
|
||||
@property() public data!: HaFormSelectData;
|
||||
|
||||
@property() public label!: string;
|
||||
@property() public label?: string;
|
||||
|
||||
@property() public helper?: string;
|
||||
|
||||
@property({ type: Boolean }) public disabled = false;
|
||||
|
||||
@ -41,6 +43,7 @@ export class HaFormSelect extends LitElement implements HaFormElement {
|
||||
.schema=${this.schema}
|
||||
.value=${this.data}
|
||||
.label=${this.label}
|
||||
.helper=${this.helper}
|
||||
.disabled=${this.disabled}
|
||||
.required=${this.schema.required}
|
||||
.selector=${this._selectSchema(this.schema.options)}
|
||||
|
@ -92,6 +92,7 @@ export class HaForm extends LitElement implements HaFormElement {
|
||||
schema: item,
|
||||
data: getValue(this.data, item),
|
||||
label: this._computeLabel(item, this.data),
|
||||
helper: this._computeHelper(item),
|
||||
disabled: this.disabled,
|
||||
hass: this.hass,
|
||||
computeLabel: this.computeLabel,
|
||||
|
Loading…
x
Reference in New Issue
Block a user