Fix update of cached datatables on connect (#5114)

This commit is contained in:
Bram Kragten 2020-03-09 16:19:23 +01:00 committed by GitHub
parent 15aee6a66a
commit 9da32880ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -117,6 +117,14 @@ export class HaDataTable extends LitElement {
this._checkedRowsChanged();
}
public connectedCallback() {
super.connectedCallback();
if (this._filteredData.length) {
// Force update of location of rows
this._filteredData = [...this._filteredData];
}
}
protected firstUpdated(properties: PropertyValues) {
super.firstUpdated(properties);
this._worker = sortFilterWorker();

View File

@ -197,6 +197,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
},
...dashboards.map((dashboard) => {
return {
filename: "",
...dashboard,
default: localStorage.defaultPage === dashboard.url_path,
};