Skip to content

Commit

Permalink
Fix sorting in settings app. Closes #134 CC: @ppf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Jun 18, 2014
1 parent 8a74cbb commit 0add12c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/kibana/apps/settings/sections/indices/_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,14 @@ <h1>
</div>
</div>

<paginate list="indexPattern.fields" per-page="20">
<paginate list="indexPattern.fields|orderBy:table.by:table.reverse" per-page="20">
<table class="table">
<thead>
<th ng-click="setFieldSort('name')">name <i ng-class="sortClass('name')"></i></th>
<th ng-click="setFieldSort('type')">type <i ng-class="sortClass('type')"></i></th>
</thead>
<tr
ng-repeat="field in page
| orderBy:table.by:table.reverse
| startFrom:table.page*table.max
| limitTo:table.max">
ng-repeat="field in page">
<td>
<span bo-text="field.name"></span>
&nbsp;
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/directives/paginate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(function (require) {

var getOtherWidth = $parse(attrs.otherWidth);

$scope.$watch(attrs.list, function (list) {
$scope.$watchCollection(attrs.list, function (list) {
$scope.pages = [];
if (!list) return;

Expand Down

0 comments on commit 0add12c

Please sign in to comment.