Commit f818bb9a107e43adfb8ef2a095635f5fffb5800b
Committed by
GitHub
1 parent
257aaa32
fix(useTableScroll): query paginationel every time to get the correct height (#355)
Showing
1 changed file
with
1 additions
and
3 deletions
src/components/Table/src/hooks/useTableScroll.ts
@@ -91,9 +91,7 @@ export function useTableScroll( | @@ -91,9 +91,7 @@ export function useTableScroll( | ||
91 | // Pager height | 91 | // Pager height |
92 | let paginationHeight = 2; | 92 | let paginationHeight = 2; |
93 | if (!isBoolean(pagination)) { | 93 | if (!isBoolean(pagination)) { |
94 | - if (!paginationEl) { | ||
95 | - paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement; | ||
96 | - } | 94 | + paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement; |
97 | if (paginationEl) { | 95 | if (paginationEl) { |
98 | const offsetHeight = paginationEl.offsetHeight; | 96 | const offsetHeight = paginationEl.offsetHeight; |
99 | paginationHeight += offsetHeight || 0; | 97 | paginationHeight += offsetHeight || 0; |