mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 19:09:48 +00:00
Add autocomplete to onboarding, cloud, and password change (#14040)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user