From c924127f377faa9b21d4be194a5f987cf3cb7cda Mon Sep 17 00:00:00 2001 From: Kaushal Shriwas <64089478+kaulith@users.noreply.github.com> Date: Sat, 19 Sep 2026 00:24:49 +0530 Subject: [PATCH 1/2] fix(columnmanager): resize body cells while dragging a column --- src/columnmanager.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/columnmanager.js b/src/columnmanager.js index d27d9acf..7a473cf7 100644 --- a/src/columnmanager.js +++ b/src/columnmanager.js @@ -165,12 +165,6 @@ export default class ColumnManager { document.body.classList.remove('dt-resize'); if (!$resizingCell) return; isDragging = false; - - const { - colIndex - } = $.data($resizingCell); - this.setColumnWidth(colIndex); - this.style.setBodyStyle(); $resizingCell = null; }; $.on(document.body, 'mouseup', onMouseup); @@ -198,6 +192,8 @@ export default class ColumnManager { width: finalWidth }); this.setColumnHeaderWidth(colIndex); + this.setColumnWidth(colIndex); + this.style.setBodyStyle(); }; $.on(document.body, 'mousemove', onMouseMove); this.instance.on('onDestroy', () => { From 3dfc317429099115c6ac4ff22487603c54dc0a8f Mon Sep 17 00:00:00 2001 From: Kaushal Shriwas <64089478+kaulith@users.noreply.github.com> Date: Sat, 19 Sep 2026 00:24:53 +0530 Subject: [PATCH 2/2] test(column): assert body width follows the header mid-drag --- cypress/integration/column.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cypress/integration/column.js b/cypress/integration/column.js index cbdc4d2c..e4108ac3 100644 --- a/cypress/integration/column.js +++ b/cypress/integration/column.js @@ -83,6 +83,19 @@ describe('Column', function () { }); }); + it('resizes body cells while the column is being dragged', function () { + cy.get('.dt-cell--header-4 .dt-cell__resize-handle') + .trigger('mousedown') + .trigger('mousemove', { pageX: 700, pageY: 20, which: 1 }); + + cy.getColumnCell(4).invoke('css', 'width').then((width) => { + cy.getCell(4, 1) + .should('have.css', 'width', width); + }); + + cy.get('body').trigger('mouseup'); + }); + it('resize column using double click', function () { cy.get('.dt-cell--header-4 .dt-cell__resize-handle').trigger('dblclick'); cy.getColumnCell(4).should('have.css', 'width')