Skip to content

Commit

Permalink
fix(table): use the fixedRows property console to report errors (#3134
Browse files Browse the repository at this point in the history
)
  • Loading branch information
betavs authored and uyarn committed Apr 11, 2024
1 parent fef03bf commit 2fbaaca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table/hooks/useFixed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default function useFixed(
defaultBottom = thead?.getBoundingClientRect().height || 0;
}
thisRowInfo.top = (lastRowInfo.top || defaultBottom) + (lastRowInfo.height || 0);
initialColumnMap.set(rowId, { ...thisRowInfo, height: tr.getBoundingClientRect().height });
initialColumnMap.set(rowId, { ...thisRowInfo, height: tr?.getBoundingClientRect().height });
}
for (let i = data.length - 1; i >= data.length - fixedBottomRows; i--) {
const tr = trList[i] as HTMLElement;
Expand All @@ -284,7 +284,7 @@ export default function useFixed(
defaultBottom = tfoot?.getBoundingClientRect().height || 0;
}
thisRowInfo.bottom = (lastRowInfo.bottom || defaultBottom) + (lastRowInfo.height || 0);
initialColumnMap.set(rowId, { ...thisRowInfo, height: tr.getBoundingClientRect().height });
initialColumnMap.set(rowId, { ...thisRowInfo, height: tr?.getBoundingClientRect().height });
}
};

Expand Down

0 comments on commit 2fbaaca

Please sign in to comment.