Giter Site home page Giter Site logo

Comments (3)

MBilalShafi avatar MBilalShafi commented on September 26, 2024

That's because the rowGrouping column does have its own colDef properties which you can customize using the groupingColDef prop.

I tried to update your codesandbox to do that for one grouping column: https://codesandbox.io/s/lucid-parm-7jqzc2?file=/Demo.tsx:759-773 (Note that if you want to have a custom tooltip for multiple columns grouping you have to update the code accordingly)

You can see more details in these documentation sections:

Let me know if this answers your concerns.

Thank You!

Sidenote: You should have stable references of the columns prop and groupingColDef prop to avoid unnecessary re-renders of the grid and have stable performance, I tried to memoize the objects in your example.

from mui-x.

JuliaKnaeble avatar JuliaKnaeble commented on September 26, 2024

Thank you a lot, it works!
As the documentation for 'custom grouping column' says 'To customize the rendering of the grouping column, use the groupingColDef prop. You can override the headerName or any property of the GridColDef interface, ..'
Given the documentation, I assumed that all properties are available and using 'groupingColDef' will simply allow you to costomize / override properties.
Now, understanding the 'groupingColDef' prop, it seems to me more like it is used to add missing properties and allows manipulation.

from mui-x.

MBilalShafi avatar MBilalShafi commented on September 26, 2024

Glad it worked!

Now, understanding the 'groupingColDef' prop, it seems to me more like it is used to add missing properties and allows manipulation.

Yes. The grouping column is not the same column as the actual column on the basis on which it's grouped, it's internally created and it has its own colDef which is defined inside the Grid, using groupingColDef you can override the default properties or add some optional ones.

Since you have the solution now, I'll go ahead and close the issue. Feel free to further clarify if you have more questions.

from mui-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.