mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Restore localizeValue to ha-form (fix selector translations) (#21923)
This commit is contained in:
parent
7f6325fa5e
commit
f09e0d187b
@ -73,6 +73,10 @@ export class HaForm extends LitElement implements HaFormElement {
|
|||||||
schema: any
|
schema: any
|
||||||
) => string | undefined;
|
) => string | undefined;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public localizeValue?: (
|
||||||
|
key: string
|
||||||
|
) => string;
|
||||||
|
|
||||||
protected getFormProperties(): Record<string, any> {
|
protected getFormProperties(): Record<string, any> {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -145,6 +149,7 @@ export class HaForm extends LitElement implements HaFormElement {
|
|||||||
.disabled=${item.disabled || this.disabled || false}
|
.disabled=${item.disabled || this.disabled || false}
|
||||||
.placeholder=${item.required ? "" : item.default}
|
.placeholder=${item.required ? "" : item.default}
|
||||||
.helper=${this._computeHelper(item)}
|
.helper=${this._computeHelper(item)}
|
||||||
|
.localizeValue=${this.localizeValue}
|
||||||
.required=${item.required || false}
|
.required=${item.required || false}
|
||||||
.context=${this._generateContext(item)}
|
.context=${this._generateContext(item)}
|
||||||
></ha-selector>`
|
></ha-selector>`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user