Skip to content

Commit

Permalink
Merge pull request #347 from ghiscoding/bugfix/auto-resize-regression
Browse files Browse the repository at this point in the history
fix(resizer): fix a regression bug caused by previous PR #341
  • Loading branch information
ghiscoding authored May 21, 2021
2 parents e775cfa + 462e330 commit 9ac7fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,6 @@ export class SlickVanillaGridBundle {
this.sharedService.dataView = this.dataView;
this.sharedService.slickGrid = this.slickGrid;

// load the resizer service
this.resizerService.init(this.slickGrid, this._gridParentContainerElm);

this.extensionService.bindDifferentExtensions();
this.bindDifferentHooks(this.slickGrid, this._gridOptions, this.dataView);
this._slickgridInitialized = true;
Expand All @@ -577,6 +574,10 @@ export class SlickVanillaGridBundle {
// initialize the SlickGrid grid
this.slickGrid.init();

// initialized the resizer service only after SlickGrid is initialized
// if we don't we end up binding our resize to a grid element that doesn't yet exist in the DOM and the resizer service will fail silently (because it has a try/catch that unbinds the resize without throwing back)
this.resizerService.init(this.slickGrid, this._gridParentContainerElm);

// user could show a custom footer with the data metrics (dataset length and last updated timestamp)
if (!this.gridOptions.enablePagination && this.gridOptions.showCustomFooter && this.gridOptions.customFooterOptions) {
this.slickFooter = new SlickFooterComponent(this.slickGrid, this.gridOptions.customFooterOptions, this.translaterService);
Expand Down

0 comments on commit 9ac7fbf

Please sign in to comment.