Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nilz3ro committed Oct 12, 2016
2 parents 7a6a665 + e16f918 commit ce5c70c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1>An example with element directives.</h1>
</s-table>
</section>
<script type="application/javascript" src="../bower_components/angular/angular.js"></script>
<script type="application/javascript" src="../build/simple-directives.js"></script>
<script type="application/javascript" src="../dist/simple-directives.js"></script>
<script type="application/javascript" src="./example-app.js"></script>
<script type="application/javascript" src="./example-controller.js"></script>
<script type="application/javascript" src="./iso-countries.js"></script>
Expand Down
8 changes: 6 additions & 2 deletions src/modules/s-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
replace: true,
transclude: true,
template: '<table class="s-table" ng-transclude></table>',
controller: ['$scope', '$element', '$attrs', '$rootScope', function ($scope, $element, $attrs, $rootScope) {
controller: ['$scope', '$element', '$attrs', '$rootScope', '$timeout', function ($scope, $element, $attrs, $rootScope, $timeout) {
var _this = this;
_this.sModelList = $scope.sModelList;
_this.onSortChange = $scope.onSortChange;
Expand Down Expand Up @@ -56,7 +56,11 @@
}
});

return (_this.onSortChange || angular.noop)(field, _this.orderTranslations[reversed]);
(_this.onSortChange || angular.noop)(field, _this.orderTranslations[reversed]);

$timeout(function () {
$scope.$digest();
});
};

$scope.$watchCollection('sTableCtrl.columns', function(newState, oldState) {
Expand Down

0 comments on commit ce5c70c

Please sign in to comment.