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

This commit is contained in:
ztw2010 2021-03-11 22:01:53 +08:00 committed by GitHub
parent 257aaa328a
commit f818bb9a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,9 +91,7 @@ export function useTableScroll(
// Pager height
let paginationHeight = 2;
if (!isBoolean(pagination)) {
if (!paginationEl) {
paginationEl = tableEl.querySelector('.ant-pagination') as HTMLElement;
}
if (paginationEl) {
const offsetHeight = paginationEl.offsetHeight;
paginationHeight += offsetHeight || 0;