Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Make row editing work with preProcessEditCellProps #3562

Merged

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Jan 7, 2022

Fixes #3557

I think the behavior is still perfectible.
If you validation takes time and you press "Enter" before it ends, it will save the last valid value, even if it's not the one displayed on screen. Maybe it would be better to not allow committing while validating.

But I would be in favor of waiting after the row / cell file split before adding additional complexity to this feature.

@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Jan 7, 2022
@flaviendelangle flaviendelangle self-assigned this Jan 7, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 7, 2022
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 10, 2022
@flaviendelangle flaviendelangle merged commit a8b2c87 into mui:master Jan 10, 2022
@flaviendelangle flaviendelangle deleted the preProcessEditCellProps-row-edit branch January 10, 2022 08:31
fireEvent.doubleClick(cell);
const input = cell.querySelector('input')!;
fireEvent.change(input, { target: { value: 'Adidas' } });
await clock.runToLast();
Copy link
Member

Choose a reason for hiding this comment

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

Why the await here? This test is not passing on Safari.

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 spent quite some time to make this test work.
It did not on Chrome Headless without the await
But if the await causes problem then the solution is not good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Row edit commit is not working when preProcessEditCellProps is defined
2 participants