Skip to content

Commit

Permalink
Add check for undefined header in Column resizer (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
LostABike authored May 10, 2023
1 parent 267a7a4 commit 70043c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-suns-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@itwin/itwinui-react': patch
---

Fixes an issue where table crashes when resizing the Column Manager column in expand mode.
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ function getLeafHeaders(header: HeaderGroup) {
const getHeaderWidth = <T extends Record<string, unknown>>(
header: ColumnInstance<T>,
) => {
if (!header) {
return 0;
}
return Number(header.width || header.resizeWidth || 0);
};

Expand Down

0 comments on commit 70043c3

Please sign in to comment.