From cf96e4be394ebdc3b67bb78b596ac9381e21c667 Mon Sep 17 00:00:00 2001 From: mintaka2479 <153734687+mintaka2479@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:54:19 +0900 Subject: [PATCH] Fixed an error when hiding a column when pinned to the right (#342) --- .../mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts b/packages/mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts index 13be391a8..06c87c349 100644 --- a/packages/mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts +++ b/packages/mantine-react-table/src/hooks/useMRT_ColumnVirtualizer.ts @@ -53,7 +53,7 @@ export const useMRT_ColumnVirtualizer = < .sort((a, b) => a - b), ] : [[], []], - [columnPinning, enableColumnPinning], + [visibleColumns.length, columnPinning, enableColumnPinning], ); const numPinnedLeft = leftPinnedIndexes.length;