Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 73392c3

Browse files
Ghislain BeaulacGhislain Beaulac
authored andcommitted
feat(resize): add possibility to override default delay before resizing
1 parent 5bd9405 commit 73392c3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,9 @@ export class AngularSlickgridComponent implements AfterViewInit, OnDestroy, OnIn
560560
}
561561

562562
// resize the grid inside a slight timeout, in case other DOM element changed prior to the resize (like a filter/pagination changed)
563-
if (this.grid && this.gridOptions.enableAutoResize) {
564-
this.resizer.resizeGrid(10, { height: this.gridHeight, width: this.gridWidth });
563+
if (this.grid && this.gridOptions.enableAutoResize) {
564+
const delay = this.gridOptions.autoResize && this.gridOptions.autoResize.delay;
565+
this.resizer.resizeGrid(delay || 10, { height: this.gridHeight, width: this.gridWidth });
565566
}
566567
}
567568
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
export interface AutoResizeOption {
2+
/** bottom padding of the grid in pixels */
23
bottomPadding?: number;
4+
5+
/** container id */
36
containerId?: string;
7+
8+
/** minimum height to use in pixels */
49
minHeight?: any;
10+
11+
/** minimum width to use in pixels */
512
minWidth?: any;
13+
14+
/** side (left/right) padding in pixels */
615
sidePadding?: number;
16+
17+
/** defaults to 10ms, delay before triggering the auto-resize */
18+
delay?: number;
719
}

0 commit comments

Comments
 (0)