Commit f818bb9a107e43adfb8ef2a095635f5fffb5800b

Authored by ztw2010
Committed by GitHub
1 parent 257aaa32

fix(useTableScroll): query paginationel every time to get the correct height (#355)

src/components/Table/src/hooks/useTableScroll.ts
... ... @@ -91,9 +91,7 @@ export function useTableScroll(
91 91 // Pager height
92 92 let paginationHeight = 2;
93 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 95 if (paginationEl) {
98 96 const offsetHeight = paginationEl.offsetHeight;
99 97 paginationHeight += offsetHeight || 0;
... ...