Compare commits

..
Author SHA1 Message Date
Aidan Timson a0b829b273 Fix initial scroll position in log details 2026-09-22 15:20:23 +01:00
3 changed files with 4 additions and 24 deletions
+2 -16
View File
@@ -123,8 +123,6 @@ export class HaDataTable extends LitElement {
@property({ type: Array }) public data: DataTableRowData[] = [];
@property({ type: Boolean }) public loading = false;
@property({ type: Boolean }) public selectable = false;
@property({ type: Boolean }) public clickable = false;
@@ -143,8 +141,6 @@ export class HaDataTable extends LitElement {
@property({ attribute: false }) public noDataText?: string;
@property({ attribute: false }) public loadingText?: string;
@property({ attribute: false }) public searchLabel?: string;
@property({ type: String }) public filter = "";
@@ -169,8 +165,6 @@ export class HaDataTable extends LitElement {
@state() private _filteredData?: DataTableRowData[];
@state() private _processing = false;
@state() private _headerHeight = 0;
@query("slot[name='header']") private _header!: HTMLSlotElement;
@@ -520,7 +514,7 @@ export class HaDataTable extends LitElement {
</slot>
</div>
${
this.loading || !this._filteredData?.length
!this._filteredData?.length
? html`
<div class="mdc-data-table__content">
<div class="mdc-data-table__row" role="row">
@@ -529,11 +523,8 @@ export class HaDataTable extends LitElement {
role="cell"
>
${
this.loading ||
this._processing ||
!this._filteredData
? this.loadingText ||
this._i18n?.localize?.("ui.common.loading") ||
? this._i18n?.localize?.("ui.common.loading") ||
"Loading"
: this.data.length
? this._i18n?.localize?.(
@@ -721,7 +712,6 @@ export class HaDataTable extends LitElement {
value !== undefined && value !== null && value !== "" && value !== nothing;
private async _sortFilterData() {
this._processing = true;
const startTime = new Date().getTime();
const timeBetweenUpdate = startTime - this._lastUpdate;
const timeBetweenRequest = startTime - this._curRequest;
@@ -772,10 +762,6 @@ export class HaDataTable extends LitElement {
this._lastUpdate = startTime;
this._filteredData = data;
if (this._curRequest === startTime) {
this._processing = false;
}
}
private _groupData = memoizeOne(
@@ -178,6 +178,7 @@ class DialogSystemLogDetail extends LitElement {
<span slot="headerTitle">${title}</span>
<ha-icon-button
id="copy"
autofocus
@click=${this._copyLog}
slot="headerActionItems"
.label=${this._i18n.localize("ui.panel.config.logs.copy")}
@@ -237,7 +238,7 @@ class DialogSystemLogDetail extends LitElement {
}
</ha-alert>`
}
<div class="contents" tabindex="-1" autofocus>
<div class="contents">
<p>
${this._i18n.localize("ui.panel.config.logs.detail.logger")}:
${item.name}<br />
@@ -108,8 +108,6 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
@state() private _data: StatisticData[] = [] as StatisticsMetaData[];
@state() private _loading = true;
@state() private filter = "";
@state() private _selected: string[] = [];
@@ -556,10 +554,6 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
}
<ha-data-table
.narrow=${this.narrow}
.loading=${this._loading}
.loadingText=${this._i18n.localize(
"ui.components.statistics_charts.loading_statistics"
)}
.columns=${columns}
.data=${this._displayData(
this._data,
@@ -760,7 +754,6 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
});
}
});
this._loading = false;
}
private _clearSelected = async () => {