Open cthurston opened 7 years ago
In the setOrder function this is what I'm thinking. I tried to create a pull request but had tab/spaces issues.
if(headCtrl.order === '-' + scope.orderBy){
headCtrl.order = '';
} else if(isActive()) {
headCtrl.order = scope.getDirection() === 'md-asc' ? '-' + scope.orderBy : scope.orderBy;
} else {
headCtrl.order = scope.getDirection() === 'md-asc' ? scope.orderBy : '-' + scope.orderBy;
}
Once a table header with md-order-by is clicked, the table component does not offer a way to remove/reset the order.
One idea is that if the sort is desc, clicking it will set the md-order value to null or empty string. This would allow instead of toggling it would cycle between 3 values up, down, and nothing.
Another idea is add a small x next to the arrow, indicating that it can be removed.