fix add assist dialog (#16275)

This commit is contained in:
Bram Kragten
2023-04-22 18:43:04 +02:00
committed by GitHub
parent 9dbdf611c5
commit cef3b99e16
10 changed files with 47 additions and 16 deletions

View File

@@ -27,6 +27,8 @@ export class HaLanguagePicker extends LitElement {
@property({ type: Boolean }) public nativeName = false;
@property({ type: Boolean }) public noSort = false;
@state() _defaultLanguages: string[] = [];
@query("ha-select") private _select!: HaSelect;
@@ -77,9 +79,11 @@ export class HaLanguagePicker extends LitElement {
}));
}
options.sort((a, b) =>
caseInsensitiveStringCompare(a.label, b.label, locale.language)
);
if (!this.noSort) {
options.sort((a, b) =>
caseInsensitiveStringCompare(a.label, b.label, locale.language)
);
}
return options;
}
);