Skip to content

Commit

Permalink
Update ModalsProvider.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
pfo-omicsstudio committed Nov 29, 2024
1 parent a95fff5 commit 675fc8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@mantine/modals/src/ModalsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ export function ModalsProvider({ children, modalProps, labels, modals }: ModalsP
);

const updateContextModal = useCallback(
(payload: { modalId: string } & Partial<OpenContextModal<any>>) => {
dispatch({ type: 'UPDATE', modalId: payload.modalId, newProps: payload });
({ modalId, ...newProps }: { modalId: string } & Partial<OpenContextModal<any>>) => {
dispatch({ type: 'UPDATE', modalId, newProps });
},
[dispatch]
);
Expand Down

0 comments on commit 675fc8d

Please sign in to comment.