Skip to content

Commit

Permalink
Refactor #11819
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Aug 12, 2022
1 parent c8770ee commit ddcc166
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable

updateScrollerPosition() {
if (this.tableFooterViewChild) {
const tableHeight = DomHandler.getOuterHeight(this.tableViewChild.nativeElement);
const tableFooterHeight = DomHandler.getOuterHeight(this.tableFooterViewChild.nativeElement);
const getClientHeight = (el) => el ? parseFloat(getComputedStyle(el).height) || DomHandler.getOuterHeight(el) : 0;
const tableHeight = getClientHeight(this.tableViewChild.nativeElement);
const tableFooterHeight = getClientHeight(this.tableFooterViewChild.nativeElement);

this.tableViewChild.nativeElement.style.height = tableHeight + tableFooterHeight + 'px';
this.tableFooterViewChild.nativeElement.style.top = `calc(100% - ${tableFooterHeight}px)`;
Expand Down

0 comments on commit ddcc166

Please sign in to comment.