From cb26e717fc40235a0ab11865041c8ba204c92d5d Mon Sep 17 00:00:00 2001 From: tshimber Date: Thu, 8 Aug 2024 16:40:08 +0200 Subject: [PATCH] fix: new lines added --- packages/components/src/components/data-grid/data-grid.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/components/src/components/data-grid/data-grid.tsx b/packages/components/src/components/data-grid/data-grid.tsx index c741f472a9..d100ee5eb1 100644 --- a/packages/components/src/components/data-grid/data-grid.tsx +++ b/packages/components/src/components/data-grid/data-grid.tsx @@ -179,10 +179,12 @@ export class DataGrid { this.applyResponsiveClasses = this.applyResponsiveClasses.bind(this); this.updateColumnStretching = this.updateColumnStretching.bind(this); } + componentWillLoad() { this.fieldsHandler(); this.rowsHandler(); } + componentDidRender() { if (this.needsAutoWidthParse) { this.calculateAutoWidths(); @@ -194,6 +196,7 @@ export class DataGrid { } }); } + componentDidLoad() { this.addResizeObserver(); } @@ -212,6 +215,7 @@ export class DataGrid { this.resetSortingToggle(); this.dataNeedsCheck = true; } + @Watch('rows') rowsHandler() { // Reset pagination to the last page of the new records if new records are less than previous.