Skip to content

Conversation

@flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Nov 14, 2025

Follow up on #20293

I think this was broken during the latest refactoring of the slots propagation.
We do need slotProps.field.slotProps to work (same for slotProps.field.slots)

@flaviendelangle flaviendelangle self-assigned this Nov 14, 2025
@flaviendelangle flaviendelangle added type: regression A bug, but worse, it used to behave as expected. scope: pickers Changes related to the date/time pickers. labels Nov 14, 2025
@mui-bot
Copy link

mui-bot commented Nov 14, 2025

Deploy preview: https://deploy-preview-20322--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 🔺+64B(+0.03%) 🔺+10B(+0.02%)
@mui/x-date-pickers-pro 🔺+128B(+0.04%) 🔺+30B(+0.04%)
@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 2e4aa0f

/>
<DateRangePicker
slotProps={{ separator: { sx: { opacity: 0.5 } } } as any}
slotProps={{
Copy link
Member Author

Choose a reason for hiding this comment

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

Reverts the doc change done in #20293

{...fieldProps}
slots={slots}
slotProps={slotProps}
slots={{ ...slots, ...(fieldProps as any).slots }}
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not doing deep merge, people can't define slots or slotProps with both approach.
But I think that is more than fine, we are just trying to fix one specific scenario which is the multi-input specific slots, that the picker is not aware of 👍

Copy link
Member

@MBilalShafi MBilalShafi Nov 19, 2025

Choose a reason for hiding this comment

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

Wondering why useSlotProps doesn't return the correct type of fieldProps.

Copy link
Member Author

@flaviendelangle flaviendelangle Nov 19, 2025

Choose a reason for hiding this comment

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

Do it doesn't 😢
fieldProps.slots is not defined

Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

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

LGTM

{...fieldProps}
slots={slots}
slotProps={slotProps}
slots={{ ...slots, ...(fieldProps as any).slots }}
Copy link
Member

@MBilalShafi MBilalShafi Nov 19, 2025

Choose a reason for hiding this comment

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

Wondering why useSlotProps doesn't return the correct type of fieldProps.

@flaviendelangle flaviendelangle merged commit f5cb080 into mui:master Nov 19, 2025
23 of 24 checks passed
@flaviendelangle flaviendelangle deleted the range-field-separator branch November 19, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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