Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dummy column created when grouping adds a redundant watch #816

Closed
nikospara opened this issue Nov 12, 2013 · 0 comments
Closed

The dummy column created when grouping adds a redundant watch #816

nikospara opened this issue Nov 12, 2013 · 0 comments

Comments

@nikospara
Copy link

This is an enhancement request.

When grouping (showGroupPanel: true), a dummy column is inserted at the start of each grid row. This is always empty and acts as a placeholder under the group expansion triangle. This column, inserted in rowFactory.getGrouping, uses the standard cell template defined here.

The empty field of the grouping column is substituted in ng-cell.js:

var cellTemplate = $scope.col.cellTemplate.replace(COL_FIELD, 'row.entity.' + $scope.col.field);

This will place a watch for the expression row.entity. (note the final dot, related to this bug). This watch is redundant since there will never be any data in this cell.

Proposed solution

Modify rowFactory.js, presently line 231, to define a simple template for the grouping column, e.g.:

// Line 231:
cellTemplate: "<div class=\"ngCellText\" ng-class=\"col.colIndex()\"></div>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants