Skip to content

[pickers] Respect explicit notched prop on the outlined PickersTextField (#22875)#22893

Merged
LukasTy merged 1 commit into
mui:v8.xfrom
LukasTy:cherry-pick-22875-to-v8.x
Jun 22, 2026
Merged

[pickers] Respect explicit notched prop on the outlined PickersTextField (#22875)#22893
LukasTy merged 1 commit into
mui:v8.xfrom
LukasTy:cherry-pick-22875-to-v8.x

Conversation

@LukasTy

@LukasTy LukasTy commented Jun 19, 2026

Copy link
Copy Markdown
Member

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 on master (it was created by the slotProps refactor #22002, not present on v8.x).

Resolution:

  • Ported the source fix in PickersOutlinedInput.tsx manually, keeping the v8.x component structure; only the renderSuffix notch logic changed so an explicit notched is respected.
  • Re-added the regression test as a self-contained PickersTextField.test.tsx, adapted to the v8.x API (InputProps={{ notched: false }} instead of the master-only slotProps.input).

@LukasTy LukasTy added type: regression A bug, but worse, it used to behave as expected. scope: pickers Changes related to the date/time pickers. cherry-pick The PR was cherry-picked from the newer alpha/beta/stable branch. labels Jun 19, 2026
@mui-bot

mui-bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy preview: https://deploy-preview-22893--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers ▼-10B(0.00%) 🔺+6B(+0.01%)
@mui/x-date-pickers-pro ▼-10B(0.00%) 🔺+6B(+0.01%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 29493d8

…Field (mui#22875)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 691a8d1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ 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 PickersOutlinedInput notch computation so an explicit notched prop wins over derived FormControl state.
  • Add a regression test covering the “filled but notched={false}” scenario for PickersTextField.
  • Update the generated API JSON metadata for PickersTextField (adds spread / themeDefaultProps fields).
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.

@LukasTy LukasTy merged commit f89d4c9 into mui:v8.x Jun 22, 2026
19 checks passed
@LukasTy LukasTy deleted the cherry-pick-22875-to-v8.x branch June 22, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick The PR was cherry-picked from the newer alpha/beta/stable branch. scope: pickers Changes related to the date/time pickers. 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.

4 participants