search box
This commit is contained in:
parent
5bfe1a255e
commit
0ecb432006
2 changed files with 13 additions and 2 deletions
|
|
@ -195,9 +195,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-repeat="btx in index.txHistory track by btx.txid"
|
<div ng-repeat="btx in index.filter(search) track by btx.txid"
|
||||||
fast-click callback-fn="home.openTxModal(btx)"
|
fast-click callback-fn="home.openTxModal(btx)"
|
||||||
class="row collapse last-transactions-content">
|
class="row collapse last-transactions-content">
|
||||||
<div class="large-6 medium-6 small-6 columns size-14">
|
<div class="large-6 medium-6 small-6 columns size-14">
|
||||||
<div class="m10r left">
|
<div class="m10r left">
|
||||||
<img src="img/icon-receive-history.svg" alt="sync" width="40" ng-show="btx.action == 'received'">
|
<img src="img/icon-receive-history.svg" alt="sync" width="40" ng-show="btx.action == 'received'">
|
||||||
|
|
|
||||||
|
|
@ -916,6 +916,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.filter = function(search) {
|
||||||
|
if (lodash.isEmpty(search)) return self.txHistory;
|
||||||
|
var result = lodash.filter(self.txHistory, function(tx) {
|
||||||
|
return lodash.includes(tx.amountStr, search) ||
|
||||||
|
lodash.includes(tx.message, search) ||
|
||||||
|
lodash.includes(self.addressbook[tx.addressTo], search) ||
|
||||||
|
lodash.includes(tx.addressTo, search);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
self.getTxsFromServer = function(client, skip, endingTxid, limit, cb) {
|
self.getTxsFromServer = function(client, skip, endingTxid, limit, cb) {
|
||||||
var res = [];
|
var res = [];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue