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] Do not throw if fieldToFocus cannot be found #5871

Merged
merged 4 commits into from
Aug 26, 2022

Conversation

cherniavskii
Copy link
Member

Fixes #5870

@cherniavskii cherniavskii added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Editing Related to the data grid Editing feature labels Aug 22, 2022
@mui-bot
Copy link

mui-bot commented Aug 22, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 381.2 685.8 567.8 527.44 123.56
Sort 100k rows ms 635.7 1,220.7 635.7 912.68 223.685
Select 100k rows ms 267.1 340.5 312.4 306.1 27.834
Deselect 100k rows ms 166.4 396 324.9 286.34 89.962

Generated by 🚫 dangerJS against 5fda1ca

Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

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

Actually I'm favor of throwing if fieldToFocus doesn't exist. Checking if the value formatter can be called only solves the problem in one location, we're still prone to calling stuff from a column definition that is null. I think in v6 we should throw in

instead of a warning.

But I'm OK with the changes from this PR.

@cherniavskii
Copy link
Member Author

Actually I'm favor of throwing if fieldToFocus doesn't exist.

On one hand it would be consistent with what we do, when rowId is missing.
On the other hand, the grid is still functional and throwing in production might not be the best solution.

@cherniavskii cherniavskii merged commit e082e1d into mui:master Aug 26, 2022
@cherniavskii cherniavskii deleted the colDef-valueFormatter-error branch August 26, 2022 11:58
alexfauquette pushed a commit to alexfauquette/mui-x that referenced this pull request Sep 20, 2022
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! feature: Editing Related to the data grid Editing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Invalid Focus Field hard to debug error
3 participants