Skip to content

Commit 4f8337b

Browse files
committed
Fix argument positioning
Signed-off-by: Itay Dafna <[email protected]>
1 parent 668b5a4 commit 4f8337b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/datagrid/src/datagrid.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ class DataGrid extends Widget {
9292
this.addClass('p-DataGrid');
9393
/* </DEPRECATED> */
9494

95+
//@ts-ignore
96+
window.datagrid = this;
97+
9598
// Parse the simple options.
9699
this._style = options.style || DataGrid.defaultStyle;
97100
this._stretchLastRow = options.stretchLastRow || false;
@@ -1506,15 +1509,15 @@ class DataGrid extends Widget {
15061509
and set remaining resize allowance number to 0.
15071510
*/
15081511
if (colsRemaining - rowColumnCount < 0) {
1509-
this._fitRowColumnHeaders(this.dataModel, colsRemaining, padding)
1512+
this._fitRowColumnHeaders(this.dataModel, padding, colsRemaining)
15101513
colsRemaining = 0;
15111514
} else {
15121515
/*
15131516
Otherwise the entire row-header column count can be resized.
15141517
Resize all row-header columns and subtract from remaining
15151518
column resize allowance.
15161519
*/
1517-
this._fitRowColumnHeaders(this.dataModel, rowColumnCount, padding);
1520+
this._fitRowColumnHeaders(this.dataModel, padding, rowColumnCount);
15181521
colsRemaining = colsRemaining - rowColumnCount;
15191522
}
15201523
} else {
@@ -1534,16 +1537,16 @@ class DataGrid extends Widget {
15341537
and set remaining resize allowance number to 0.
15351538
*/
15361539
if (colsRemaining - bodyColumnCount < 0) {
1537-
this._fitBodyColumnHeaders(this.dataModel, colsRemaining, padding);
1540+
this._fitBodyColumnHeaders(this.dataModel, padding, colsRemaining);
15381541
colsRemaining = 0;
15391542
} else {
15401543
/*
15411544
Otherwise the entire body column count can be resized.
15421545
Resize based on the smallest number between remaining
15431546
resize allowance and body column count.
15441547
*/
1545-
this._fitBodyColumnHeaders(this.dataModel,
1546-
Math.min(colsRemaining, bodyColumnCount), padding);
1548+
this._fitBodyColumnHeaders(this.dataModel, padding,
1549+
Math.min(colsRemaining, bodyColumnCount));
15471550
}
15481551
} else {
15491552
// No column resize cap passed - resizing all columns.

0 commit comments

Comments
 (0)