Skip to content

Commit c05038b

Browse files
authored
fix(Table): fix table affix robustness (#5561)
1 parent 0d106d9 commit c05038b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/components/table/hooks/useAffix.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default function useAffix(props: TdBaseTableProps) {
7777
const updateAffixHeaderOrFooter = () => {
7878
if (!isAffixed.value && !isVirtualScroll.value && !tableContentRef.value) return;
7979
const pos = tableContentRef.value?.getBoundingClientRect();
80+
if (!pos) return;
8081
const headerRect = tableContentRef.value?.querySelector('thead')?.getBoundingClientRect();
8182
const headerHeight = headerRect?.height || 0;
8283
const footerRect = affixFooterRef.value?.getBoundingClientRect();

0 commit comments

Comments
 (0)