-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
See this plunker http://plnkr.co/edit/RqIItEtFTXe6k6U8kwiT?p=preview
Column Name is not sorted initially.
- Group by Name column
- Ungroup Name
Grid is sorted.
This may be undesirable behaviour - I would expect grid to return to the state that it was in, before I grouped and ungouped it.
The clearGrouping
method description says:
Doesn't remove sorting, as we don't know whether that sorting was added by grouping or was there beforehand
Here's the code that adds sorting ( groupColumn
method):
// add sort if not present
if ( !column.sort ){
column.sort = { direction: uiGridConstants.ASC };
} else if ( typeof(column.sort.direction) === 'undefined' || column.sort.direction === null ){
column.sort.direction = uiGridConstants.ASC;
}
Maybe we could save previous sort state of the column before we add our sort. We could add some fileld like previousSort
on the column
object and apply it when we remove grouping.
Metadata
Metadata
Assignees
Labels
No labels