From fa201819a72888f53b67e75c7e00885ac7fd0544 Mon Sep 17 00:00:00 2001 From: Alessandro Cuppari Date: Wed, 27 Sep 2023 18:52:32 +0100 Subject: [PATCH] fix: storybook runtime errors --- packages/mantine-react-table/src/footer/MRT_TableFooter.tsx | 3 +-- packages/mantine-react-table/src/head/MRT_TableHeadCell.tsx | 3 +-- packages/mantine-react-table/src/head/MRT_TableHeadRow.tsx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/mantine-react-table/src/footer/MRT_TableFooter.tsx b/packages/mantine-react-table/src/footer/MRT_TableFooter.tsx index 5d47ea22e..92493cebb 100644 --- a/packages/mantine-react-table/src/footer/MRT_TableFooter.tsx +++ b/packages/mantine-react-table/src/footer/MRT_TableFooter.tsx @@ -24,7 +24,7 @@ export const MRT_TableFooter = = {}>({ } = table; const { isFullScreen } = getState(); - const { className, ...tableFooterProps } = + const tableFooterProps = mantineTableFooterProps instanceof Function ? mantineTableFooterProps({ table }) : mantineTableFooterProps; @@ -41,7 +41,6 @@ export const MRT_TableFooter = = {}>({ layoutMode === 'grid' ? classes.MRT_TableFooterGrid : classes.MRT_TableFooterTableRowGroup, - className, )} style={(theme) => ({ ...(tableFooterProps?.style instanceof Function diff --git a/packages/mantine-react-table/src/head/MRT_TableHeadCell.tsx b/packages/mantine-react-table/src/head/MRT_TableHeadCell.tsx index 00d4e2e5c..c3a3fe43f 100644 --- a/packages/mantine-react-table/src/head/MRT_TableHeadCell.tsx +++ b/packages/mantine-react-table/src/head/MRT_TableHeadCell.tsx @@ -94,7 +94,7 @@ export const MRT_TableHeadCell = = {}>({ borderRight: draggingBorder, borderTop: draggingBorder, } - : undefined; + : {}; const handleDragEnter = (_e: DragEvent) => { if (enableGrouping && hoveredColumn?.id === 'drop-zone') { @@ -127,7 +127,6 @@ export const MRT_TableHeadCell = = {}>({ = {}>({ } = table; const { isFullScreen } = getState(); - const { className, ...tableRowProps } = + const tableRowProps = mantineTableHeadRowProps instanceof Function ? mantineTableHeadRowProps({ headerGroup, table }) : mantineTableHeadRowProps; @@ -44,7 +44,6 @@ export const MRT_TableHeadRow = = {}>({ className={clsx( classes.MRT_TableHeadRow, stickyHeader && classes.MRT_TableHeadRowSticky, - className, )} __vars={{ '--display': layoutMode === 'grid' ? 'flex' : 'table-row',