From 2bb0e00389a5fc2463890331df62928be974169c Mon Sep 17 00:00:00 2001 From: Annie <22462084+LostABike@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:23:41 -0500 Subject: [PATCH 1/3] check undefined --- .../itwinui-react/src/core/Table/hooks/useResizeColumns.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx b/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx index a1680581631..d4b21ae8a4a 100644 --- a/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx +++ b/packages/itwinui-react/src/core/Table/hooks/useResizeColumns.tsx @@ -496,6 +496,9 @@ function getLeafHeaders(header: HeaderGroup) { const getHeaderWidth = >( header: ColumnInstance, ) => { + if (!header) { + return 0; + } return Number(header.width || header.resizeWidth || 0); }; From de9f4fe54d3e41faafc8a55efd2bb956776a1957 Mon Sep 17 00:00:00 2001 From: Annie <22462084+LostABike@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:35:43 -0500 Subject: [PATCH 2/3] added changeset --- .changeset/hip-suns-repeat.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/hip-suns-repeat.md diff --git a/.changeset/hip-suns-repeat.md b/.changeset/hip-suns-repeat.md new file mode 100644 index 00000000000..743321f4550 --- /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 From 617dbe6574320f5fb21525e80986251a4cc5e192 Mon Sep 17 00:00:00 2001 From: Annie <22462084+LostABike@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:36:31 -0500 Subject: [PATCH 3/3] .. --- .changeset/hip-suns-repeat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/hip-suns-repeat.md b/.changeset/hip-suns-repeat.md index 743321f4550..3a3419a88e0 100644 --- a/.changeset/hip-suns-repeat.md +++ b/.changeset/hip-suns-repeat.md @@ -2,4 +2,4 @@ '@itwin/itwinui-react': patch --- -Fixes an issue where table crashes when resizing the Column Manager column in expand mode +Fixes an issue where table crashes when resizing the Column Manager column in expand mode.