From 63b2fb2c203db4990841f45b5aa85717a73b397f Mon Sep 17 00:00:00 2001 From: Erki Aas Date: Tue, 8 Nov 2022 19:40:47 +0200 Subject: [PATCH] Performance improvements --- src/components/Grid/Main/config.js | 1 + src/components/LogViewer.vue | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/Grid/Main/config.js b/src/components/Grid/Main/config.js index 9f2101e..d099268 100644 --- a/src/components/Grid/Main/config.js +++ b/src/components/Grid/Main/config.js @@ -1,6 +1,7 @@ import ComboboxFilter from "../../Filter/ComboboxFilter"; const config = { + getRowId: params => params.data._id, defaultColDef: { width: 120, initialPinned: true, diff --git a/src/components/LogViewer.vue b/src/components/LogViewer.vue index 495cfb4..239c411 100644 --- a/src/components/LogViewer.vue +++ b/src/components/LogViewer.vue @@ -125,11 +125,12 @@ export default { }, handleReceiveMessage (event) { const eventData = parseEventData(event.data); - const res = this.gridApi.applyTransaction({ + this.gridApi.applyTransactionAsync({ add: [eventData] - }); - const rowNode = res.add[0] - this.gridApi.flashCells({ rowNodes: [rowNode]}); + }, (res) => { + const rowNode = res.add[0] + this.gridApi.flashCells({ rowNodes: [rowNode]}); + }) }, handleReceiveFilters (event) { let data = parseEventData(event.data);