diff --git a/apps/mantine-react-table-docs/pages/changelog.mdx b/apps/mantine-react-table-docs/pages/changelog.mdx index 807c8ef86..22e686ee9 100644 --- a/apps/mantine-react-table-docs/pages/changelog.mdx +++ b/apps/mantine-react-table-docs/pages/changelog.mdx @@ -12,6 +12,10 @@ import Head from 'next/head'; ### V1 +#### V1.0.0-beta.24 + +- Fixed Edit and Create Row Modals not opening + #### V1.0.0-beta.23 - a bunch of create row features (still in progress) diff --git a/packages/mantine-react-table/package.json b/packages/mantine-react-table/package.json index a37e8ccdc..dc2f22cd5 100644 --- a/packages/mantine-react-table/package.json +++ b/packages/mantine-react-table/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.23", + "version": "1.0.0-beta.24", "license": "MIT", "name": "mantine-react-table", "description": "A fully featured Mantine implementation of TanStack React Table V8, written from the ground up in TypeScript.", diff --git a/packages/mantine-react-table/src/modals/MRT_EditRowModal.tsx b/packages/mantine-react-table/src/modals/MRT_EditRowModal.tsx index cda6827ca..eee3a68f7 100644 --- a/packages/mantine-react-table/src/modals/MRT_EditRowModal.tsx +++ b/packages/mantine-react-table/src/modals/MRT_EditRowModal.tsx @@ -66,6 +66,7 @@ export const MRT_EditRowModal = >({ opened={open} withCloseButton={false} {...modalProps} + key={row.id} > {((creatingRow && renderCreateRowModalContent?.({ diff --git a/packages/mantine-react-table/src/table/MRT_Table.tsx b/packages/mantine-react-table/src/table/MRT_Table.tsx index 0f9f05920..73b25de7f 100644 --- a/packages/mantine-react-table/src/table/MRT_Table.tsx +++ b/packages/mantine-react-table/src/table/MRT_Table.tsx @@ -151,6 +151,9 @@ export const MRT_Table = >({ virtualPaddingRight, }; + const createModalOpen = creatingMode === 'modal' && creatingRow; + const editModalOpen = editingMode === 'modal' && editingRow; + return ( <> >({ )} {enableTableFooter && }
- {(creatingRow && creatingMode === 'modal') || - (editingRow && editingMode === 'modal' && ( - - ))} + {(createModalOpen || editModalOpen) && ( + + )} ); };