Skip to content

[material-ui][TextField] Fix ownerState silent propagation#42345

Closed
DiegoAndai wants to merge 1 commit intomui:nextfrom
DiegoAndai:text-field-owner-state-fixes
Closed

[material-ui][TextField] Fix ownerState silent propagation#42345
DiegoAndai wants to merge 1 commit intomui:nextfrom
DiegoAndai:text-field-owner-state-fixes

Conversation

@DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented May 22, 2024

This is a symptom of #42184. Fixes #42391

Introduced due to #42001 and #42062 being merged in parallel without testing them together. I think this is why Argos didn't catch it.

Bug

https://next.mui.com/material-ui/react-text-field/

Screenshot 2024-05-22 at 15 48 41 Screenshot 2024-05-22 at 15 48 22

Fix

PR preview: Waiting for PR deploy

Benchmark: https://mui.com/material-ui/react-text-field/

Notes

The TextField's intricate ownerState scheme is hard to track and maintain. There are probably bugs similar to these that we didn't catch.

@DiegoAndai DiegoAndai added package: material-ui type: regression A bug, but worse, it used to behave as expected. labels May 22, 2024
@DiegoAndai DiegoAndai requested review from mnajdova and siriwatknp May 22, 2024 19:55
@DiegoAndai DiegoAndai self-assigned this May 22, 2024
@mui-bot
Copy link

mui-bot commented May 22, 2024

Netlify deploy preview

https://deploy-preview-42345--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 796fd6e

@DiegoAndai
Copy link
Member Author

See Argos "failures" for further fixes 😅

};

// https://github.com/mui/material-ui/issues/42184
delete ownerState.ownerState;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the issue comes from

isMatch = variant.props({ ownerState, ...props, ...ownerState });
, should we maybe handle it there instead? Intercept if ownerState.ownerState exists and remove it? I can't find any use-case when we would want to have it.

@DiegoAndai
Copy link
Member Author

Closed in favor of #42358

@DiegoAndai DiegoAndai closed this May 28, 2024
@oliviertassinari oliviertassinari removed the type: bug It doesn't behave as expected. label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrading from 6.0.0-alpha.7 to 6.0.0-alpha.8 breaks styles of TextField

4 participants