Grouping aggregation functions break when grouping by the column they were applied too.
#4,142 opened on Aug 7, 2015
Description
Hello, Ive noticed that aggregation functions break when grouping by the column they are applied to. Steps to reproduce:
- Visit tutorial 320 here: http://ui-grid.info/docs/#/tutorial/320_complex_grouping
- Select 'group' in the column menu for any (or all) of the 'balance' columns
expected result: The column continues to display its aggregated result whether or not it is grouped. actual result: the aggregated column changes to be blank.
now: 3. ungroup the column
expected result: Grouping a column and then ungrouping it should return the grid to the exact state it was in before grouping. actual result: The column remains blank, having grouped it appears to have permanently destroyed its ability to aggregate values inside of it. The only way to restore functionality is to refresh the page.
What I believe is happening: Using the column menu to group an item causes UIgrid to overwrite the custom aggregation function I defined with its own function, but still uses the custom finalizer function. Since I built my finalizer function using knowledge of the aggregation function, it breaks.