From 14e96a843f42b558642712c5c38152f9baee8631 Mon Sep 17 00:00:00 2001 From: Will Johnson Date: Wed, 26 Jun 2024 15:29:50 +0100 Subject: [PATCH 1/2] fix: ensure widget is child before remove --- source/class/qxl/datagrid/ui/WidgetPane.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/class/qxl/datagrid/ui/WidgetPane.js b/source/class/qxl/datagrid/ui/WidgetPane.js index fc1d525..bc4cff7 100644 --- a/source/class/qxl/datagrid/ui/WidgetPane.js +++ b/source/class/qxl/datagrid/ui/WidgetPane.js @@ -274,7 +274,9 @@ qx.Class.define("qxl.datagrid.ui.WidgetPane", { if (child) { this.__widgetFactory.unbindWidget(child); child.setUserData("qxl.datagrid.cellData", null); - this._remove(child); + if (child.getLayoutParent() === this) { + this._remove(child); + } if (this.getShouldDiscardWidgets()) { this.__widgetFactory.disposeWidget(child); } From f90db543a374cb886d3d825c3021115a57515a8a Mon Sep 17 00:00:00 2001 From: Will Johnson Date: Fri, 28 Jun 2024 11:48:55 +0100 Subject: [PATCH 2/2] feat: force grid update --- source/class/qxl/datagrid/DataGrid.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/class/qxl/datagrid/DataGrid.js b/source/class/qxl/datagrid/DataGrid.js index 9d1f930..0713238 100644 --- a/source/class/qxl/datagrid/DataGrid.js +++ b/source/class/qxl/datagrid/DataGrid.js @@ -207,6 +207,13 @@ qx.Class.define("qxl.datagrid.DataGrid", { * Event handler for changes in the data source's size */ __onDataSourceChangeSize() { + this.forceUpdate(); + }, + + /** + * Forces the grid to fully update it's display. Use sparingly. + */ + forceUpdate() { this.getQxObject("widgetPane").invalidateAll(); this.__sizeCalculator.invalidate(); this.updateWidgets();