Restore localizeValue to ha-form (fix selector translations) (#21923)

This commit is contained in:
karwosts 2024-09-09 02:20:08 -07:00 committed by GitHub
parent 7f6325fa5e
commit f09e0d187b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,6 +73,10 @@ export class HaForm extends LitElement implements HaFormElement {
schema: any
) => string | undefined;
@property({ attribute: false }) public localizeValue?: (
key: string
) => string;
protected getFormProperties(): Record<string, any> {
return {};
}
@ -145,6 +149,7 @@ export class HaForm extends LitElement implements HaFormElement {
.disabled=${item.disabled || this.disabled || false}
.placeholder=${item.required ? "" : item.default}
.helper=${this._computeHelper(item)}
.localizeValue=${this.localizeValue}
.required=${item.required || false}
.context=${this._generateContext(item)}
></ha-selector>`