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

[DataGridPro] Footer in "grid" zone/container #2795

Closed
2 tasks done
clmntrss opened this issue Oct 6, 2021 · 7 comments
Closed
2 tasks done

[DataGridPro] Footer in "grid" zone/container #2795

clmntrss opened this issue Oct 6, 2021 · 7 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user waiting for 👍 Waiting for upvotes

Comments

@clmntrss
Copy link

clmntrss commented Oct 6, 2021

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Hello, I'm currently using the Datagrid on a project and I use a custom Footer to get total of each columns if its a number or whatever. The issue i've came when the minimal size of the table is bigger than the current window width. I've 2 different scrollbar

I've been able to "fix" this issue with but it's breaks the flex ability of the grid and create sometime kind of infinite resizing on certain devices

minWidth: 'fit-content',

Examples 🌈

Initial behavior

image

image

With custom fix

image

Motivation 🔦

I would be able to put the footer in the data grid window container or to have a synced scroll between both the footer row and the grid container.

Order ID 💳 (optional)

No response

@clmntrss clmntrss added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 6, 2021
@clmntrss clmntrss changed the title [Datagrid] Footer in "grid" zone [Datagrid] Footer in "grid" zone/container Oct 6, 2021
@DanailH
Copy link
Member

DanailH commented Oct 7, 2021

Hi, @clmntrss thanks for raising this. Can you please provide the codesabdox reproduction? You can use this template https://codesandbox.io/s/material-ui-issue-next-o7xkt as a starting point.

@DanailH DanailH added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer status: waiting for author Issue with insufficient information labels Oct 7, 2021
@clmntrss
Copy link
Author

clmntrss commented Oct 7, 2021

@DanailH

You can find it here :
https://codesandbox.io/s/romantic-dijkstra-7s3o2?file=/src/Demo.tsx

I would like to add that the behavior I've in mind is more like the summary on Antd table
https://ant.design/components/table/#components-table-demo-summary

@DanailH
Copy link
Member

DanailH commented Oct 7, 2021

Ah ok, I get it. This sounds more like a column pinning feature, no? Can you check here #193 if this matches your requirement (we didn't account for the footer to be included)?

@DanailH DanailH added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 7, 2021
@clmntrss
Copy link
Author

clmntrss commented Oct 7, 2021

I took a look at issue and I think it's more like Row Pinning issue and not column might be linked to #1251

OP said something that match the idea I want to realise with the footer on codesandbox
I also add an extra row to the bottom of the table which sums up the total of each column

Edit : I think this example with antd table is a bit more understandable since the link I gave mix column pinning and row

https://codesandbox.io/s/fixed-header-and-scroll-bar-with-the-page-antd-4-17-0-alpha-5-forked-g0clq?file=/index.js

@DanailH
Copy link
Member

DanailH commented Oct 8, 2021

Ok, yes the example from Antd does look like a combination of row and column pinning.

@DanailH DanailH added the waiting for 👍 Waiting for upvotes label Oct 11, 2021
@flaviendelangle flaviendelangle added components: DataGridPro and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 8, 2021
@flaviendelangle flaviendelangle changed the title [Datagrid] Footer in "grid" zone/container [DatagridPro] Footer in "grid" zone/container Nov 8, 2021
@oliviertassinari oliviertassinari changed the title [DatagridPro] Footer in "grid" zone/container [DataGridPro] Footer in "grid" zone/container Nov 12, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 12, 2021

I think that @clmntrss could implement this with #1251 + #192 + a custom last row's cell. I think that we could close this issue once they have landed, with a demo codesandbox to prove it's fixed.

@mui-org/x This makes me wonder, shouldn't #1251 (row pinning) be in the Pro plan? #193 (column pinning) is.

@oliviertassinari oliviertassinari added the plan: Pro Impact at least one Pro user label Dec 5, 2021
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Jan 29, 2022
@cherniavskii
Copy link
Member

The data grid now supports row pinning and aggregation features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

5 participants