I’d like to be able to group more than one column but not in a nested way, but at the same level. The following example will demonstrate what I mean: For each ‘state’ there’s a certain value of ‘capital’. If I want to group people by state with a default grouping mode I get multiple rows under the same state, each with the same capital, which is not very clear to read through.
This is what I mean https://codesandbox.io/p/devbox/material-react-table-example-aggregation-and-grouping-5ele9k?embed=1&file=%2Fsrc%2FTS.tsx
I know I can set grouping: [‘state’, ‘capital’], but this would add another level and another row in the table, while I’d like to achieve something like in the attached picture. Is there an easy way to achieve this?
enter image description here