Skip to content

Commit

Permalink
Bug: Fix sizing method being debounced on view inits rather than just…
Browse files Browse the repository at this point in the history
… window resize.
  • Loading branch information
amcdnl committed Dec 4, 2016
1 parent 2a715e3 commit d52a92d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/datatable.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,13 +738,22 @@ export class DatatableComponent implements OnInit, AfterViewInit {
*
* @memberOf DatatableComponent
*/
@HostListener('window:resize')
@throttleable(5)
recalculate(): void {
this.recalculateDims();
this.recalculateColumns();
}

/**
* Window resize handler to update sizes.
*
* @memberOf DatatableComponent
*/
@HostListener('window:resize')
@throttleable(5)
onWindowResize(): void {
this.recalculate();
}

/**
* Recalulcates the column widths based on column width
* distribution mode and scrollbar offsets.
Expand Down

0 comments on commit d52a92d

Please sign in to comment.