hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

Support for View row counts

Open petradish opened this issue 2 years ago • 1 comments

Applications using the Cube currently define their own custom row count labels in order to show row counts for leaf rows and aggregate rows. Store/GridCountLabel is able to count all rows (aggregates + leaves) when {includeChildren: true}, but many clients are more interested in leaf counts (filtered and unfiltered).

I think we should create readily accessible getters for aggregate and filtered leaf row counts on View and possibly enhance our current gridCountLabel to bind to a view and have options to show aggregates or leaves. In one client app, we've created a custom component that reports on all 3 row counts using a tooltip:

Screen Shot 2022-03-09 at 4 16 16 PM

petradish avatar Mar 09 '22 21:03 petradish

Maybe split the difference and provide the convenience getter on views to make this a bit easier for applications?

Seems like a flag on the control to toggle what it shows might also be useful.

Multiple row types seems like a tough one to generalize, especially w.r.t to what the app is using to refer to the different row types.

lbwexler avatar Apr 14 '22 19:04 lbwexler