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

View File

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

View File

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