Skip to content

Commit

Permalink
fix(useTableScroll): query paginationel every time to get the correct…
Browse files Browse the repository at this point in the history
… height (#355)
  • Loading branch information
ztw2010 authored Mar 11, 2021
1 parent 257aaa3 commit f818bb9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/Table/src/hooks/useTableScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ export function useTableScroll(
// Pager height
let paginationHeight = 2;
if (!isBoolean(pagination)) {
if (!paginationEl) {
paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement;
}
paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement;
if (paginationEl) {
const offsetHeight = paginationEl.offsetHeight;
paginationHeight += offsetHeight || 0;
Expand Down

0 comments on commit f818bb9

Please sign in to comment.