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.