Rename autofill to autocomplete for text selector (#14202)

This commit is contained in:
Steve Repsher 2022-10-27 09:30:08 -04:00 committed by GitHub
parent 523d936010
commit a56b2e3270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View File

@ -39,7 +39,7 @@ export class HaTextSelector extends LitElement {
.disabled=${this.disabled} .disabled=${this.disabled}
@input=${this._handleChange} @input=${this._handleChange}
autocapitalize="none" autocapitalize="none"
.autocomplete=${this.selector.text.autofill} .autocomplete=${this.selector.text.autocomplete}
spellcheck="false" spellcheck="false"
.required=${this.required} .required=${this.required}
autogrow autogrow
@ -59,7 +59,7 @@ export class HaTextSelector extends LitElement {
html`<div style="width: 24px"></div>` html`<div style="width: 24px"></div>`
: this.selector.text?.suffix} : this.selector.text?.suffix}
.required=${this.required} .required=${this.required}
.autocomplete=${this.selector.text.autofill} .autocomplete=${this.selector.text.autocomplete}
></ha-textfield> ></ha-textfield>
${this.selector.text?.type === "password" ${this.selector.text?.type === "password"
? html`<ha-icon-button ? html`<ha-icon-button

View File

@ -234,7 +234,7 @@ export interface StringSelector {
| "datetime-local" | "datetime-local"
| "color"; | "color";
suffix?: string; suffix?: string;
autofill?: string; autocomplete?: string;
}; };
} }

View File

@ -18,21 +18,25 @@ import { onboardUserStep } from "../data/onboarding";
import { PolymerChangedEvent } from "../polymer-types"; import { PolymerChangedEvent } from "../polymer-types";
const CREATE_USER_SCHEMA: HaFormSchema[] = [ const CREATE_USER_SCHEMA: HaFormSchema[] = [
{ name: "name", required: true, selector: { text: { autofill: "name" } } }, {
name: "name",
required: true,
selector: { text: { autocomplete: "name" } },
},
{ {
name: "username", name: "username",
required: true, required: true,
selector: { text: { autofill: "username" } }, selector: { text: { autocomplete: "username" } },
}, },
{ {
name: "password", name: "password",
required: true, required: true,
selector: { text: { type: "password", autofill: "new-password" } }, selector: { text: { type: "password", autocomplete: "new-password" } },
}, },
{ {
name: "password_confirm", name: "password_confirm",
required: true, required: true,
selector: { text: { type: "password", autofill: "new-password" } }, selector: { text: { type: "password", autocomplete: "new-password" } },
}, },
]; ];