-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGridPro] Allow to automatically group the rows in a Tree Data #2725
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There's still this one: https://github.com/mui-org/material-ui-x/pull/2725/files#r752488746 |
@m4theushw Done 👍 |
Is there an ETA when this feature will be released? |
@sanjinbecirovic we don't have a fixed date but depending on the feedback it could be for the 02/11. |
Is not the sidebar that is wrong? In most of the demos in https://mui.com/components/accordion/#customization, the arrow is pointing up when the item is open. Only https://mui.com/components/accordion/#customization reproduces the same pattern as the sidebar. cc @danilo-leal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data generator is generating duplicated paths. This causes unwanted behaviors if users open the demo in CodeSandbox and change the number of rows to something big, like 2k rows. See this example: https://codesandbox.io/s/treedatafullexample-material-demo-forked-hkm7q?file=/demo.tsx
I think we could also send an error to the console if the paths are not unique, similar to what happens with the key
prop. It took me some time to figure out they weren't unique.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@m4theushw concerning the non-uniq paths, I indeed only applied the logic to the non-seeded generator, so below 1000 lines. For the unicity test, same thing I think it can be done in a folow up PR. And probably in dev mode only to avoid overhead |
onChange={(event) => setDisableChildrenSorting(event.target.checked)} | ||
/> | ||
} | ||
label="Enable `disableChildrenSorting`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting is different from https://deploy-preview-2725--material-ui-x.netlify.app/components/data-grid/group-pivot/#filtering.
> For instance: | ||
|
||
```ts | ||
// The row A.A is immediately after its parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code should be inside the warning.
const validRows = [{ path: ['A'] }, { path: ['A', 'A'] }, { path: ['B'] }]; | ||
|
||
// The row A.A is not immediately after its parent | ||
const invalidRows = [{ path: ['A'] }, { path: ['B'] }, { path: ['A', 'A'] }]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add emojis to make clear what is the wrong pattern. Two examples: https://mui.com/guides/minimizing-bundle-size/#option-1 and https://mui.com/customization/how-to-customize/#main-content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Matheus Wichman <matheushw@outlook.com>
Thank you for the reply, 02/11 is a release or? I've seen the code has been merged? but not released? |
02/12 not 02/11 my bad. |
Closes #210 (I will create new issues for the following features in the Tree Data)
Preview doc
Merging plan
Merge [core] Each hook should initialize its state synchronously #2782
Extract independent features in stand-alone PRs
Extract the selector breaking changes [DataGrid] Unify filtering / sorting / pagination / rows selectors #2942
Extract the list => tree migration in
useGridRows
,useGridFilter
,useGridSorting
and rendering [core] Implement tree-based row management #2996Extract the data generator updates [core] Adapt
useDemoData
for Tree Data #2978Merge the
useGridTreeData
and directly related features + its documentation1-3 should be done before the major release because 3. is a breaking change.