Skip to content

Commit

Permalink
fix(HeaderCell): null pointer if rendered HeaderCell count increases
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed Aug 8, 2023
1 parent 36afcc1 commit 3b0ddab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/table/Cell/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const useUpdateLayout = (index: number, hide: boolean | Nullish) => {
if (dataColumn.isStiff || layout?.horizontalScroll) {
const preservedDataColumn = getPreservedColumn(dataColumn.index, preservedDataColumns);

if (!preservedDataColumn) return 'minmax(0px, 1fr)';

return `${preservedDataColumn.width || preservedDataColumn.minWidth * 2}px`;
} else {
return 'minmax(0px, 1fr)';
Expand Down

0 comments on commit 3b0ddab

Please sign in to comment.