Add autocomplete to onboarding, cloud, and password change (#14040)

This commit is contained in:
Steve Repsher
2022-10-10 13:54:16 -04:00
committed by GitHub
parent 8444fe0a07
commit a4fcb743fa
8 changed files with 29 additions and 5 deletions

View File

@@ -15,6 +15,8 @@ export class HaTextField extends TextFieldBase {
// @ts-ignore
@property({ type: Boolean }) public iconTrailing?: boolean;
@property() public autocomplete?: string;
override updated(changedProperties: PropertyValues) {
super.updated(changedProperties);
if (
@@ -27,6 +29,13 @@ export class HaTextField extends TextFieldBase {
);
this.reportValidity();
}
if (changedProperties.has("autocomplete")) {
if (this.autocomplete) {
this.formElement.setAttribute("autocomplete", this.autocomplete);
} else {
this.formElement.removeAttribute("autocomplete");
}
}
}
protected override renderIcon(