Add pagination to transaction proposals All-tab
This commit is contained in:
parent
08f0e548bd
commit
c51731dc69
3 changed files with 15 additions and 2 deletions
|
|
@ -8,6 +8,9 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
$scope.onlyPending = true;
|
||||
$scope.lastShowed = false;
|
||||
|
||||
$scope.txpCurrentPage = 1;
|
||||
$scope.txpItemsPerPage = 4;
|
||||
|
||||
$scope.update = function () {
|
||||
$scope.loading = false;
|
||||
controllerUtils.updateTxs({onlyPending:$scope.onlyPending});
|
||||
|
|
|
|||
|
|
@ -19,4 +19,13 @@ angular.module('copay.filters', [])
|
|||
return { addr: key, value: dic[key] };
|
||||
});
|
||||
};
|
||||
});
|
||||
})
|
||||
.filter('paged', function() {
|
||||
return function(elements, page, pageSize, disable) {
|
||||
if (disable) return elements;
|
||||
|
||||
var from = (page - 1) * pageSize;
|
||||
var to = from + pageSize;
|
||||
return elements.slice(from, to);;
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue