angular-ui/ui-grid

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

Open

#5,149 创建于 2016年2月20日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)JavaScript (5,395 star) (2,496 fork)batch import
good first issue

描述

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.

贡献者指南