Open olivroy opened 2 months ago
It's not impossible, but I think it'd be very difficult just because all the grouping is done on the JavaScript side right now. You'd need a way to associate an aggregate value with a group, or make assumptions about how the grouping is done in JS, e.g. what order the groups are in.
I think the best way to do this would be to let you define both the row groups and the aggregate values at the same time in R, so you'd have full control over both the grouping and aggregation. That would be similar to other common requests for a "tree table" feature, so linking https://github.com/glin/reactable/issues/391, https://github.com/glin/reactable/issues/379, https://github.com/glin/reactable/issues/112, https://github.com/glin/reactable/issues/147
I am trying to add support for summary rows in gt and its wrapper for reactable (#1359). However, the
aggregate
argument is not flexible enough.Since gt precomputes its summary values, I wonder if there is a way to just plug those in the
aggregate
argument.I wonder if there would be a way to pass values of the length of groups.
So that I could just plug the summary values that are computed in gt in the reactable call.
I'd be happy to contribute this to reactable with some guidance