[pickers] Respect explicit notched prop on the outlined PickersTextField (#22875)#22893
Merged
Merged
Conversation
|
Deploy preview: https://deploy-preview-22893--material-ui-x.netlify.app/ Bundle size report
|
4be3670 to
29493d8
Compare
Contributor
There was a problem hiding this comment.
⚠️ Not ready to approve
The newly added test renders PickersTextField without several required props, which is likely to emit PropTypes console errors and can cause CI failures depending on the test harness.
Pull request overview
Cherry-pick to v8.x that fixes a regression where PickersTextField (outlined variant) could not honor an explicitly provided notched={false} because the notch state was always derived as truthy once the field became “filled”.
Changes:
- Update
PickersOutlinedInputnotch computation so an explicitnotchedprop wins over derived FormControl state. - Add a regression test covering the “filled but
notched={false}” scenario forPickersTextField. - Update the generated API JSON metadata for
PickersTextField(addsspread/themeDefaultPropsfields).
File summaries
| File | Description |
|---|---|
| packages/x-date-pickers/src/PickersTextField/PickersTextField.test.tsx | Adds regression coverage for outlined notch behavior with and without explicit notched={false}. |
| packages/x-date-pickers/src/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.tsx | Fixes notch derivation logic to respect explicit notched values. |
| docs/pages/x/api/date-pickers/pickers-text-field.json | Updates generated API metadata fields (spread, themeDefaultProps). |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
siriwatknp
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #22875 to
v8.x.The automated cherry-pick (run) failed on a modify/delete conflict: the regression test was added to
PickersTextField.test.tsx, which only exists onmaster(it was created by theslotPropsrefactor #22002, not present onv8.x).Resolution:
PickersOutlinedInput.tsxmanually, keeping thev8.xcomponent structure; only therenderSuffixnotch logic changed so an explicitnotchedis respected.PickersTextField.test.tsx, adapted to thev8.xAPI (InputProps={{ notched: false }}instead of the master-onlyslotProps.input).