diff --git a/.changeset/hip-suns-repeat.md b/.changeset/hip-suns-repeat.md new file mode 100644 index 00000000000..3a3419a88e0 --- /dev/null +++ b/.changeset/hip-suns-repeat.md @@ -0,0 +1,5 @@ +--- +'@itwin/itwinui-react': patch +--- + +Fixes an issue where table crashes when resizing the Column Manager column in expand mode. diff --git a/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx b/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx index ccf6f733c9a..bab0eee8e78 100644 --- a/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx +++ b/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx @@ -494,6 +494,9 @@ function getLeafHeaders(header: HeaderGroup) { const getHeaderWidth = >( header: ColumnInstance, ) => { + if (!header) { + return 0; + } return Number(header.width || header.resizeWidth || 0); };