Skip to content

Commit 8dd0359

Browse files
Artyom Solovyovmportuga
Artyom Solovyov
authored andcommitted
Fix zero delta on double click resizing
1 parent f16cdb0 commit 8dd0359

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/features/resize-columns/js/ui-grid-column-resizer.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,14 @@
536536

537537
if (width > maxWidth) {
538538
maxWidth = width;
539-
xDiff = maxWidth - width;
540539
}
541540
});
542541
});
543542

544543
// check we're not outside the allowable bounds for this column
545-
col.width = constrainWidth(col, maxWidth);
544+
var newWidth = constrainWidth(col, maxWidth);
545+
xDiff = newWidth - col.drawnWidth;
546+
col.width = newWidth;
546547
col.hasCustomWidth = true;
547548

548549
refreshCanvas(xDiff);

0 commit comments

Comments
 (0)