We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89b3412 commit 15da4f5Copy full SHA for 15da4f5
packages/datagrid/src/datagrid.ts
@@ -1536,11 +1536,11 @@ class DataGrid extends Widget {
1536
} else {
1537
/*
1538
Otherwise the entire body column count can be resized.
1539
- Resize all body columns and subtract from remaining
1540
- column resize allowance.
+ Resize based on the smallest number between remaining
+ resize allowance and body column count.
1541
*/
1542
- this._fitBodyColumnHeaders(this.dataModel, bodyColumnCount);
1543
- colsRemaining = colsRemaining - bodyColumnCount;
+ this._fitBodyColumnHeaders(this.dataModel,
+ Math.min(colsRemaining, bodyColumnCount));
1544
}
1545
1546
// No column resize cap passed - resizing all columns.
0 commit comments