From 2e7943a9f9fe03c87c1f6a1285b5ccd6bf02b59f Mon Sep 17 00:00:00 2001 From: gitstart Date: Mon, 19 Feb 2024 15:21:10 +0000 Subject: [PATCH 1/2] fix: forward external ownerstate to inner components properly Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com> --- packages/mui-material/src/Accordion/Accordion.js | 2 -- packages/mui-material/src/Collapse/Collapse.js | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mui-material/src/Accordion/Accordion.js b/packages/mui-material/src/Accordion/Accordion.js index 3adf939dcd5cdd..0b7fd2e9d41fb1 100644 --- a/packages/mui-material/src/Accordion/Accordion.js +++ b/packages/mui-material/src/Accordion/Accordion.js @@ -180,8 +180,6 @@ const Accordion = React.forwardRef(function Accordion(inProps, ref) { ownerState, }); - delete transitionProps.ownerState; - return ( Date: Mon, 19 Feb 2024 17:05:13 +0000 Subject: [PATCH 2/2] fix prettier error Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com> --- packages/mui-material/src/Collapse/Collapse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mui-material/src/Collapse/Collapse.js b/packages/mui-material/src/Collapse/Collapse.js index 1ebe790b35b517..27bc19224a42f5 100644 --- a/packages/mui-material/src/Collapse/Collapse.js +++ b/packages/mui-material/src/Collapse/Collapse.js @@ -290,7 +290,7 @@ const Collapse = React.forwardRef(function Collapse(inProps, ref) { ref={handleRef} {...childProps} // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps` - // that might have been forwarded from the Transition component. + // that might have been forwarded from the Transition component. ownerState={{ ...ownerState, state }} >