mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[DataGridPremium] Server-side data source with row grouping

Open MBilalShafi opened this issue 1 year ago • 7 comments

👨‍💻 Ready for Review 👨‍💻

Part of #8179 Resolves #10859

Preview: https://deploy-preview-13826--material-ui-x.netlify.app/x/react-data-grid/server-side-data/row-grouping/

Action items

  • [x] Add support for groupingValueGetter
  • [x] Support row grouping features on useMockServer:
    • [x] Sorting
    • [x] Filtering
    • [x] Pagination
    • [x] Support more datasets
  • [x] Rows with missing groups
  • [x] Fix Argos' regression
  • [x] Add/refine documentation

Follow-ups:

  • [ ] Support sort and filter on the Group column(s) for row grouping and tree data
  • [ ] Test coverage

MBilalShafi avatar Jul 15 '24 03:07 MBilalShafi

Hi @MBilalShafi, are you able to provide an ETA for this? Thank you!

tommy-wl avatar Jul 18 '24 14:07 tommy-wl

Hey @tommy-wl, thank you for reaching out.

The ETA for this feature is around the end of Q3, its currently one of the main focus areas for the team. Feel free to test the under development feature and provide some early feedback if you want.

MBilalShafi avatar Jul 18 '24 21:07 MBilalShafi

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

github-actions[bot] avatar Aug 22 '24 11:08 github-actions[bot]

@MBilalShafi Looking for an update on this or an ETA. Premium customer - Support ID: 96081

forwardslahsdotj avatar Sep 12 '24 15:09 forwardslahsdotj

@forwardslahsdotj

The goal is to deliver the feature by around Q3 end, though it depends on how fast the closure of remaining action items and the code review process takes. I hope it gets closed before the v8 pre-release phase, which starts sometime in October.

MBilalShafi avatar Sep 13 '24 11:09 MBilalShafi

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

github-actions[bot] avatar Oct 16 '24 23:10 github-actions[bot]

@MBilalShafi great work! Super excited to start using this feature as soon as it is released!

Quick question: just to confirm, does this work grouping multiple columns at the same time as well? https://mui.com/x/react-data-grid/row-grouping/#multiple-grouping-columns

Thanks

Premium customer - Support ID: 96081

tommy-wl avatar Oct 25 '24 14:10 tommy-wl

Hey @tommy-wl,

just to confirm, does this work grouping multiple columns at the same time as well? mui.com/x/react-data-grid/row-grouping#multiple-grouping-columns

Yes, single column and multiple column grouping both should work with this feature.

MBilalShafi avatar Oct 25 '24 15:10 MBilalShafi

Hi @MBilalShafi

Server side row grouping was fine on MUI Data Grid v7 (Grouping on single and multiple columns).

Upon upgrading to v8 (8.5.2 -- also tried 8.0.0), the following was observed:

Screenshot 2025-06-16 230250

Multiple is the first level grouping.

When clicking on it to expand, the second level groups do appear (Ahmed, Client Anastasia and Guest).

However:

  • Second level groups are not indented (Issue 1)
  • First level group clicked is not expanded (chevron is still pointing to the right) (Issue 2)

Clicking the first level group Multiple again correctly shows the expanded state (chevron down) and indent for second level groups.

When trying to click and expand other first level groups, the following error appears (Issue 3):

Uncaught TypeError: Cannot read properties of undefined (reading 'depth')
    at gridFilterSelector.js:92:39
    at Array.reduce (<anonymous>)
    at gridFilterSelector.js:90:30
    at recomputationWrapper (createSelectorCreator.ts:392:63)
    at memoized (lruMemoize.ts:217:20)
    at dependenciesChecker (createSelectorCreator.ts:412:39)
    at memoized (weakMapMemoize.js:100:21)
    at Object.selector (createSelector.js:82:14)
    at useGridSelector.js:59:37
    at Store.js:19:35

These issues never occurred on v7.

Please advise.

Thank you.

Premium customer - Support ID: 96081

tommy-wl avatar Jun 17 '25 03:06 tommy-wl

Hi @MBilalShafi

Server side row grouping was fine on MUI Data Grid v7 (Grouping on single and multiple columns).

Upon upgrading to v8 (8.5.2 -- also tried 8.0.0), the following was observed:

Screenshot 2025-06-16 230250

Multiple is the first level grouping.

When clicking on it to expand, the second level groups do appear (Ahmed, Client Anastasia and Guest).

However:

  • Second level groups are not indented (Issue 1)
  • First level group clicked is not expanded (chevron is still pointing to the right) (Issue 2)

Clicking the first level group Multiple again correctly shows the expanded state (chevron down) and indent for second level groups.

When trying to click and expand other first level groups, the following error appears (Issue 3):

Uncaught TypeError: Cannot read properties of undefined (reading 'depth')
    at gridFilterSelector.js:92:39
    at Array.reduce (<anonymous>)
    at gridFilterSelector.js:90:30
    at recomputationWrapper (createSelectorCreator.ts:392:63)
    at memoized (lruMemoize.ts:217:20)
    at dependenciesChecker (createSelectorCreator.ts:412:39)
    at memoized (weakMapMemoize.js:100:21)
    at Object.selector (createSelector.js:82:14)
    at useGridSelector.js:59:37
    at Store.js:19:35

These issues never occurred on v7.

Please advise.

Thank you.

Premium customer - Support ID: 96081

Hey @tommy-wl could you please open a new issue with this information? And please include a minimal reproduction of the bug we can look at.

michelengelen avatar Jun 17 '25 06:06 michelengelen