angular-ui/ui-grid

Summary header(max, avg) not displayed when 'columnDefs' has 'cellFilter'

Open

#5,149 opened on Feb 20, 2016

View on GitHub
 (1 comment) (1 reaction) (0 assignees)JavaScript (5,395 stars) (2,496 forks)batch import
good first issue

Description

Summary : While grouping, max, avg at the summary level is not displayed if there is a cellFilter='number:' in the column definition.

How to reproduce the bug : Step 1 : Open the Plunker for UI grid grouping in the tutorials page : http://plnkr.co/edit/?p=preview

Step2 : In the Plunker for Ui grid(grouping), add cellFilter to "age" columnDef. ie before change { name: 'age', treeAggregationType: uiGridGroupingConstants.aggregation.MAX, width: '20%'},

after change { name: 'age', treeAggregationType: uiGridGroupingConstants.aggregation.MAX, width: '20%', cellFilter: 'number: 0'},

Step 3: Notice the change in the UI grid. The "max: " is removed from the summary level for the age column.If we remove cellFilter: 'number: 0' from the colDef of Age column, it comes back.

In this particular case, cellFilter does not make sense(for the age column). But there could be balances like "salary" which can have 2 digits after the decimal point. If the users of the grid tries to apply the cellFilter in the salary column and chose to group by say Dept, then the average salary at the aggregated level may not be seen.

Contributor guide

Summary header(max, avg) not displayed when 'columnDefs' has 'cellFilter' · angular-ui/ui-grid#5149 | Good First Issue