From 675fc8d4b3ee9db5f22755b14ae74d174449d971 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 29 Nov 2024 13:49:51 +0100 Subject: [PATCH] Update ModalsProvider.tsx --- packages/@mantine/modals/src/ModalsProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@mantine/modals/src/ModalsProvider.tsx b/packages/@mantine/modals/src/ModalsProvider.tsx index 37a89e08d9..a594cc2633 100644 --- a/packages/@mantine/modals/src/ModalsProvider.tsx +++ b/packages/@mantine/modals/src/ModalsProvider.tsx @@ -148,8 +148,8 @@ export function ModalsProvider({ children, modalProps, labels, modals }: ModalsP ); const updateContextModal = useCallback( - (payload: { modalId: string } & Partial>) => { - dispatch({ type: 'UPDATE', modalId: payload.modalId, newProps: payload }); + ({ modalId, ...newProps }: { modalId: string } & Partial>) => { + dispatch({ type: 'UPDATE', modalId, newProps }); }, [dispatch] );