Skip to content

Commit

Permalink
Merge pull request #462 from ghiscoding/bugfix/angular-render-problem
Browse files Browse the repository at this point in the history
refactor: add 10ms delay on 1st resize so it's after grid render
  • Loading branch information
ghiscoding authored Sep 1, 2021
2 parents aa9597a + 011d85c commit ce245a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/common/src/services/resizer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export class ResizerService {
}

// -- 1st resize the datagrid size at first load (we need this because the .on event is not triggered on first load)
this.resizeGrid()
// -- also we add a slight delay (in ms) so that we resize after the grid render is done
this.resizeGrid(10, newSizes)
.then(() => this.resizeGridWhenStylingIsBrokenUntilCorrected())
.catch((rejection: any) => console.log('Error:', rejection));

Expand Down

0 comments on commit ce245a2

Please sign in to comment.