[pickers] sx
property of PickersDay
doesn't update properly when controlled by state in renderDay
function
#6017
Labels
bug 馃悰
Something doesn't work
component: pickers
This is the name of the generic UI component, not the React module!
Duplicates
Latest version
Current behavior 馃槸
State changes within a component in the
renderDay
function of a date picker (e.g.StaticDatePicker
), when applied to thesx
property of thePickersDay
component, do not apply any change to thePickersDay
element's styling without another property being updated. Other properties (e.g.selected
) do.Expected behavior 馃
When the value of
sx
changes it should update the styling.Steps to reproduce 馃暪
CodeSandbox
Context 馃敠
I'm trying to make the day elements a drop target for drag-and-drop, and I want to change the styling when a day is being hovered over to provide visual feedback to the user.
Your environment 馃寧
Chrome 104
npx @mui/envinfo
Order ID 馃挸 (optional)
No response
The text was updated successfully, but these errors were encountered: