Skip to content

Commit

Permalink
Rename autofill to autocomplete for text selector (#14202)
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep authored Oct 27, 2022
1 parent 523d936 commit a56b2e3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/ha-selector/ha-selector-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/data/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export interface StringSelector {
| "datetime-local"
| "color";
suffix?: string;
autofill?: string;
autocomplete?: string;
};
}

Expand Down
12 changes: 8 additions & 4 deletions src/onboarding/onboarding-create-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" } },
},
];

Expand Down

0 comments on commit a56b2e3

Please sign in to comment.