From d52a92d5104f906b24accc004e5d0e2dd6c80447 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 4 Dec 2016 12:07:43 -0500 Subject: [PATCH] Bug: Fix sizing method being debounced on view inits rather than just window resize. --- src/components/datatable.component.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/datatable.component.ts b/src/components/datatable.component.ts index 65ee97669..bf723b307 100644 --- a/src/components/datatable.component.ts +++ b/src/components/datatable.component.ts @@ -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.