Provide Group By Context To Aggregation #2255
Unanswered
joe-l-bright
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to discuss adding 'existingGroupBy' as a param to the aggregation...
https://github.com/tannerlinsley/react-table/blob/d2acfc423593389f8f7b974c6f544ecf683f0724/src/plugin-hooks/useGroupBy.js#L246
We have a use case where aggregations are determined based on Groupings.
e.g. If I group by Age, I would like to aggregate Height with Average, but if I group by City, I would like to aggregate Height with Mean.
If we pass GroupBy into the function, I could then create a mapping of group to aggregate and look that up before rendering.
Please advise of any existing solutions as well! Thanks.
Beta Was this translation helpful? Give feedback.
All reactions