-
-
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
[DataGrid] Column spanning #4020
Conversation
These are the results for the performance tests:
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
packages/grid/x-data-grid-pro/src/hooks/features/columnResize/useGridColumnResize.tsx
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
Changing |
packages/grid/x-data-grid/src/hooks/features/columns/useGridColumnSpanning.ts
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
I've one proposal to add support for column virtualization. First, open https://codesandbox.io/s/columnspanning-material-demo-forked-zcu0n0 and scroll horizontally 201px:
Since the Quantity column is not fully visible, To solve that we can render the first cell of the spanned column. The proposal is basically to modify In pseudo-code:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Nice job with the feature!
I loved the example exploring the function signature with the week calendar.
Leaving just a couple of minor tweaks on the docs page.
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.
I think it's good enough to be released. Later https://mui.com/x/react-data-grid/group-pivot/#row-grouping can use column spanning in the grouping columns.
packages/grid/x-data-grid-pro/src/tests/columnSpanning.DataGridPro.test.tsx
Outdated
Show resolved
Hide resolved
packages/grid/x-data-grid/src/hooks/features/keyboardNavigation/useGridKeyboardNavigation.ts
Outdated
Show resolved
Hide resolved
Where exactly column spanning may be useful? |
With aggregation the other cells can contain data (even without aggregation, users can populate them if they want, but it's probably not very frequent) |
Closes #192
Docs: https://deploy-preview-4020--material-ui-x.netlify.app/x/react-data-grid/columns/#column-spanning
Storybook demo: https://deploy-preview-4020--material-ui-x.netlify.app/storybook/?path=/story/datagridpro-test-columns--column-spanning
Changelog
🎁 Add support for Column spanning ([DataGrid] Column spanning #4020) @cherniavskii
TODO:
colSpan
+ column resizecolSpan
+ paginationyarn docs:api
ignores some interfaces #4024)colSpan
+ column virtualization (BLOCKER) - demo showing the issueCheck if this can be solved by
columnThreshold={0}
colSpan
+ CSV export - extracted to separate issue [data-grid] Support column spanning in CSV export #4213colSpan
+ print exportcolSpan
+ column resizecolSpan
+ hidden columnscolSpan
+ column reordercolSpan
+ column pinningcolSpan
+ keyboard navigationcolSpan
+ row virtualizationcolSpan
+renderCell
/renderEditCell
colSpan
+ cell editingcolSpan
number signaturecolSpan
function signature