Skip to content

Commit

Permalink
add Reset button to demo
Browse files Browse the repository at this point in the history
fix sort icons when resetting grid
  • Loading branch information
Zacharias3690 committed May 7, 2015
1 parent 6dfc093 commit 5052def
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<tc-column tc-name="Status" tc-visible="vm.show.Status">{{row.Status}}</tc-column>
<tc-column tc-visible="vm.show.Controls"><button ng-click="test()">Click me</button></tc-column>
</tc-grid>

<button ng-click="vm.gridOptions.reset()">Reset Grid</button>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions dist/tc-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
function reset() {
$scope.options.paging.currentPage = 1;
$scope.options.sorting.sort = [];
cleanSortClasses();
pageChanged();
sortChanged();
}
Expand Down
1 change: 1 addition & 0 deletions src/js/tcGridDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
function reset() {
$scope.options.paging.currentPage = 1;
$scope.options.sorting.sort = [];
cleanSortClasses();
pageChanged();
sortChanged();
}
Expand Down

0 comments on commit 5052def

Please sign in to comment.