-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[question] Can you manually adjust the height of the aggregation display row? #10061
Comments
You should find what you need in the following links: https://mui.com/x/react-data-grid/row-height/#variable-row-height https://codesandbox.io/s/agitated-surf-rghlwv?file=/Demo.js Does that answer your question? |
Please provide a minimal reproduction test case with the latest version. This would help a lot 👷. |
Working on that recreation. Trying to simplify things as much as possible because our table is pretty heavy on custom cellRenderers and feature implementations. I'll probably have a link to it bright and early tomorrow. Edit: Still working on this. Can't seem to get it to replicate just yet. Trying to find what settings in mine are different without fully recreating my whole setup. |
I actually figured it out. I can post the example if you'd like or you can just close it. In my custom cell renderer there was an overlap with some old tailwind css code that I accidentally left in that was causing it to not wrap properly. In case anyone ever needs it for their own diagnosis, or just so you guys have it here's the problematic code and also the link to my sandbox setup
Sandbox: https://codesandbox.io/s/frosty-saha-rpqhlq Thank you for your help along the way. |
👍 |
Order ID
70732
Duplicates
Latest version
The problem in depth 🔍
I have a datagrid that has a column for total values (Second column from the right in the image below). I would like to aggregate those, but also apply some additional fees. I am hoping to display that data as MUI Typography components stacked on top of each other vertically. Here is an image of the bottom of my table with the aggregated values displayed
Note the blue text (ignore the values since I'm just arbitrarily using the same number to check if it would indeed get cut off) stacking and how it gets cut off. Is there a way I can manually increase the height of that generated row so that the text isn't cut off? Ideally something that doesn't require too much weird CSS hacking where I make edits by some random html class or ID outside of the datagrid customization / style logic. CSS hacks would work too though if necessary since any way to do it is better than nothing.
The primary reason I decided to do it via the aggregation row is that I hope to also have the values exported with the built in CSV / Excel export too. I'm not sure if that will function correctly the way I've set things up, but I can cross that bride when I get there.
Alternatively, I considered customizing the footer, but I also want things to line up with the total column cells. I didn't see a way to output data into a certain column via the footer. This way probably also prevents me from exporting though. I didn't see any documentation on how to include the footer in various export formats.
Any help is greatly appreciated on this.
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: