Fix label filters from URL (#22447)

This commit is contained in:
karwosts 2024-10-20 23:56:46 -07:00 committed by GitHub
parent f05c204da3
commit 4669decfd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 10 deletions

View File

@ -223,8 +223,9 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
private _setFiltersFromUrl() {
const domain = this._searchParms.get("domain");
const configEntry = this._searchParms.get("config_entry");
const label = this._searchParms.has("label");
if (!domain && !configEntry) {
if (!domain && !configEntry && !label) {
return;
}
@ -247,10 +248,7 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
items: undefined,
},
};
if (this._searchParms.has("label")) {
this._filterLabel();
}
this._filterLabel();
}
private _filterLabel() {

View File

@ -1013,8 +1013,9 @@ ${
private _setFiltersFromUrl() {
const domain = this._searchParms.get("domain");
const configEntry = this._searchParms.get("config_entry");
const label = this._searchParms.has("label");
if (!domain && !configEntry) {
if (!domain && !configEntry && !label) {
return;
}
@ -1025,10 +1026,7 @@ ${
"ha-filter-integrations": domain ? [domain] : [],
config_entry: configEntry ? [configEntry] : [],
};
if (this._searchParms.has("label")) {
this._filterLabel();
}
this._filterLabel();
}
private _filterLabel() {