Skip to content

Conversation

@arminmeh
Copy link
Contributor

@arminmeh arminmeh commented Oct 30, 2025

Fixes #20143

Caused by #19898 that fixed #19732

I have added tests emulating demos from
#19732 and #20143
to make sure that both cases work

Related demos with the updated package
https://stackblitz.com/edit/g3buqpzu-tc6suvum?file=package.json
https://stackblitz.com/edit/rdabj1by-cgnlz1xc?file=package.json

@arminmeh arminmeh requested a review from cherniavskii October 30, 2025 12:45
@arminmeh arminmeh added scope: data grid Changes related to the data grid. type: regression A bug, but worse, it used to behave as expected. feature: Editing Related to the data grid Editing feature labels Oct 30, 2025
@mui-bot
Copy link

mui-bot commented Oct 30, 2025

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

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid ▼-13B(0.00%) ▼-4B(0.00%)
@mui/x-data-grid-pro ▼-13B(0.00%) ▼-4B(0.00%)
@mui/x-data-grid-premium ▼-13B(0.00%) ▼-4B(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 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@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 c603d4d

@arminmeh arminmeh changed the title [DataGrid] Update cell editable state if editable prop is updated in the column definition [DataGrid] Update cell editable state if editable prop is updated in the column definition Oct 30, 2025
// This is to ensure both of the following cases work:
// - https://github.com/mui/mui-x/issues/19732
// - https://github.com/mui/mui-x/issues/20143
useGridSelector(apiRef, () => apiRef.current.isCellEditable(cellParams));
Copy link
Member

Choose a reason for hiding this comment

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

Haha, this was my fix initially, but then I thought I could as well use it 🫠
Thanks for fixing it and adding tests!

@arminmeh arminmeh merged commit cd2c62d into mui:master Oct 31, 2025
26 checks passed
@arminmeh arminmeh deleted the cell-editable-updates branch October 31, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Editing Related to the data grid Editing feature scope: data grid Changes related to the data grid. 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.

[data grid] isCellEditable broken after 8.14.1 [data grid] isCellEditable callback contains stale data from the outer scope

3 participants