fix(dees-chart-log): replay buffered log entries when terminal becomes ready and sync logEntries updates to re-render filtered logs
This commit is contained in:
@@ -445,6 +445,19 @@ export class DeesChartLog extends DeesElement {
|
||||
this.rateInterval = setInterval(() => this.calculateRate(), 1000);
|
||||
|
||||
this.terminalReady = true;
|
||||
|
||||
// Replay any entries that arrived via updateLog()/addLog() before terminal was ready
|
||||
for (const entry of this.logBuffer) {
|
||||
this.writeLogEntry(entry);
|
||||
}
|
||||
}
|
||||
|
||||
public updated(changedProperties: Map<string, any>) {
|
||||
super.updated(changedProperties);
|
||||
if (changedProperties.has('logEntries') && this.terminalReady && this.logEntries.length > 0) {
|
||||
this.logBuffer = [...this.logEntries];
|
||||
this.reRenderFilteredLogs();
|
||||
}
|
||||
}
|
||||
|
||||
private getTerminalTheme() {
|
||||
|
||||
Reference in New Issue
Block a user