-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
scope: data gridChanges related to the data grid.Changes related to the data grid.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.
Description
Steps to reproduce
Link to live example: (required)
Steps:
- Set one of the column definition's render props (e.g.
renderCell) to a dynamic value (based on another state) - Set the type of the column definition
- Trigger a change to the value of the render prop in Step 1
https://stackblitz.com/edit/github-3rk5go-nd8osk?file=src%2Fdemo.tsx
Current behavior
The Grid state doesn't reset to its default when the "render" prop is set back to undefined when the "type" of the column is specified but it does when the "type" is not set.
Expected behavior
If one of the props in the column definition object is updated to undefined after previously being set, then the MUI default for that prop should be used even when the type of the column definition is set.
Context
It stopped working following the 7.19.0 release. After some investigation I found it broke after #14456 was merged.
Your environment
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords: undefined, column definition
Order ID: 91184
Metadata
Metadata
Assignees
Labels
scope: data gridChanges related to the data grid.Changes related to the data grid.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.