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

[DataGridPremium] Fix leafField to have correct focus value #7950

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

MBilalShafi
Copy link
Member

@MBilalShafi MBilalShafi commented Feb 16, 2023

Fixes #7949

The leafField was borrowing hasFocus from the actual cell (not the grouping one where it's rendered) and passing it in leafField.renderCell due to which the user can not keep track of the true focused cell.

Before: https://codesandbox.io/s/hasfocus-for-row-grouping-leaves-tuw57o?file=/demo.tsx
After: https://codesandbox.io/s/hasfocus-for-row-grouping-leaves-forked-359w8j?file=/demo.tsx

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! plan: Premium Impact at least one Premium user feature: Row grouping Related to the data grid Row grouping feature needs cherry-pick The PR should be cherry-picked to master after merge labels Feb 16, 2023
@MBilalShafi MBilalShafi self-assigned this Feb 16, 2023
@mui-bot
Copy link

mui-bot commented Feb 16, 2023

Messages
📖 Netlify deploy preview: https://deploy-preview-7950--material-ui-x.netlify.app/

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 630.5 1,081 645.2 818.04 180.016
Sort 100k rows ms 694.9 1,338.7 1,338.7 1,024.52 237.882
Select 100k rows ms 221.1 478.9 307.1 330.72 92.297
Deselect 100k rows ms 171.6 327.7 205.8 223.82 54.298

Generated by 🚫 dangerJS against 7e10bb2

Copy link
Member

@cherniavskii cherniavskii left a comment

Choose a reason for hiding this comment

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

Nice 🎉

Co-authored-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com>
Signed-off-by: Bilal Shafi <bilalshafidev@gmail.com>
@MBilalShafi MBilalShafi merged commit c120409 into mui:next Feb 16, 2023
MBilalShafi added a commit to MBilalShafi/mui-x that referenced this pull request Feb 16, 2023
@MBilalShafi MBilalShafi deleted the fix-leaf-field-focus branch February 16, 2023 12:16
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: Row grouping Related to the data grid Row grouping feature needs cherry-pick The PR should be cherry-picked to master after merge plan: Premium Impact at least one Premium user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

params.hasFocus does not work for row grouping leaf fields
3 participants