Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui] Prevent ownerState propagation for transition slots #44401

Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7ba4b13
remove ownerState if custom transition slot is provided
ZeeshanTamboli Nov 13, 2024
ac5ca15
prettier
ZeeshanTamboli Nov 13, 2024
3018428
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Nov 13, 2024
abc5ada
add description and test
ZeeshanTamboli Nov 13, 2024
131adc5
fix test
ZeeshanTamboli Nov 13, 2024
11dc5f5
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Nov 13, 2024
17478d6
Update packages/mui-material/src/utils/useSlot.ts
ZeeshanTamboli Nov 16, 2024
f4d4d07
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Nov 20, 2024
c435a13
prevent ownerState propagation in Zoom and Fade components
ZeeshanTamboli Nov 20, 2024
c3ac857
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Nov 20, 2024
fa69642
prevent ownerState in Slide and Grow
ZeeshanTamboli Nov 20, 2024
79cee1b
Add code comments
ZeeshanTamboli Nov 20, 2024
42cc23e
pnpm proptypes
ZeeshanTamboli Nov 20, 2024
4f9606f
pnpm proptypes
ZeeshanTamboli Nov 20, 2024
7ea5845
adjust comment formatting
ZeeshanTamboli Nov 20, 2024
988ac79
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Dec 13, 2024
7c0e6d1
add tests
ZeeshanTamboli Dec 14, 2024
a2287e6
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Dec 14, 2024
158ddde
add defaultExpanded
ZeeshanTamboli Dec 14, 2024
7eec13c
do not forward incoming ownerState in Collapse component
ZeeshanTamboli Dec 17, 2024
03e4eb8
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Dec 17, 2024
f52ac6e
add test
ZeeshanTamboli Dec 18, 2024
99b7f2d
improve
ZeeshanTamboli Dec 18, 2024
b875da5
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
ZeeshanTamboli Dec 18, 2024
6524aa5
Update packages/mui-material/src/Collapse/Collapse.test.js
DiegoAndai Dec 18, 2024
2da1a43
pnpm dedupe
DiegoAndai Dec 18, 2024
82c4ed8
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
DiegoAndai Dec 18, 2024
0fc6f3d
Merge branch 'master' into remove-ownerState-propogation-accordion-tr…
DiegoAndai Dec 18, 2024
8af558e
Merge branch 'remove-ownerState-propogation-accordion-transition-slot…
ZeeshanTamboli Dec 18, 2024
bffe3d7
Fix test
DiegoAndai Dec 18, 2024
52912dd
Merge branch 'remove-ownerState-propogation-accordion-transition-slot…
ZeeshanTamboli Dec 18, 2024
8511dc8
fix lint
ZeeshanTamboli Dec 18, 2024
ea60c29
pnpm dedupe
ZeeshanTamboli Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prevent ownerState in Slide and Grow
ZeeshanTamboli committed Nov 20, 2024
commit fa696422b4b73f19e54d9fa38c65acc87f60d27f
4 changes: 2 additions & 2 deletions packages/mui-material/src/Grow/Grow.js
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ const Grow = React.forwardRef(function Grow(props, ref) {
timeout={timeout === 'auto' ? null : timeout}
{...other}
>
{(state, childProps) => {
{(state, { ownerState, ...restChildProps }) => {
return React.cloneElement(children, {
style: {
opacity: 0,
@@ -200,7 +200,7 @@ const Grow = React.forwardRef(function Grow(props, ref) {
...children.props.style,
},
ref: handleRef,
...childProps,
...restChildProps,
});
}}
</TransitionComponent>
4 changes: 2 additions & 2 deletions packages/mui-material/src/Slide/Slide.js
Original file line number Diff line number Diff line change
@@ -252,15 +252,15 @@ const Slide = React.forwardRef(function Slide(props, ref) {
timeout={timeout}
{...other}
>
{(state, childProps) => {
{(state, { ownerState, ...restChildProps }) => {
return React.cloneElement(children, {
ref: handleRef,
style: {
visibility: state === 'exited' && !inProp ? 'hidden' : undefined,
...style,
...children.props.style,
},
...childProps,
...restChildProps,
});
}}
</TransitionComponent>