Issue when grouping with multiple columns #294
-
mantine-react-table version2.0.0-beta.0 react & react-dom versions18.2.0 Describe the bug and the steps to reproduce itI believe there is a bug, and it exists in the documentation as well: Minimal, Reproducible Example - (Optional, but Recommended)When grouping by State, Arizona reports 8: When grouping by State then Gender, the sub grouping accurately reports 6 Arizona males, 2 Arizona females. However, the total for Arizona went from reporting 8 to now 2 Screenshots or Videos (Optional)No response Do you intend to try to help solve this bug with your own PR?None Terms
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Okay, I think I now see where the disconnect is. Arizona reports "2" because there are two unique genders in the Arizona group, not eight unique genders. Is this the "universal standard" for reporting multi-level grouping? |
Beta Was this translation helpful? Give feedback.
Hey, yes that is correct. Grouping happens at the first sub-row level, so you see (2) because there are 2 unique genders and then under Male you see 6 and under Female you see 2. You can always define your own aggregation function if you need something different.