瀏覽代碼

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

ztw2010 4 年之前
父節點
當前提交
f818bb9a10
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/components/Table/src/hooks/useTableScroll.ts

+ 1 - 3
src/components/Table/src/hooks/useTableScroll.ts

@@ -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;