diff --git a/src/cdk/table/sticky-styler.ts b/src/cdk/table/sticky-styler.ts index 763cb0acc0e..f0fca155b40 100644 --- a/src/cdk/table/sticky-styler.ts +++ b/src/cdk/table/sticky-styler.ts @@ -140,6 +140,10 @@ export class StickyStyler { this._addStickyStyle(row, position, stickyHeight); } + if (rowIndex === rows.length - 1) { + // prevent unnecessary reflow from getBoundingClientRect() + return; + } stickyHeight += row.getBoundingClientRect().height; } }