Skip to content

Commit

Permalink
fix callback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed May 30, 2024
1 parent a7f122a commit ee945b8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/mui-material/src/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ const Modal = React.forwardRef(function Modal(inProps, ref) {
},
slotProps: {
root: slotProps.root ?? componentsProps.root,
backdrop: backdropSlotProps,
backdrop:
typeof slotProps?.backdrop === 'function'
? slotProps?.backdrop
: {
...(BackdropProps ?? {}),
...(componentsProps?.backdrop ?? {}),
...(slotProps.backdrop ?? {}),
},
},
};

Expand Down

0 comments on commit ee945b8

Please sign in to comment.