Fix - 315 - Currency search doesn't work when entering from Settings
This commit is contained in:
parent
95ee98cd65
commit
eced42806d
2 changed files with 5 additions and 2 deletions
|
|
@ -68,8 +68,11 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
|
|||
};
|
||||
|
||||
$scope.findCurrency = function(search) {
|
||||
console.log(search);
|
||||
if (!search) init();
|
||||
$scope.altCurrencyList = lodash.filter(completeAlternativeList, function(item) {
|
||||
console.log(search);
|
||||
var list = lodash.unique(lodash.union(completeAlternativeList, lodash.union($scope.lastUsedAltCurrencyList, popularCurrencyList)), 'isoCode');
|
||||
$scope.altCurrencyList = lodash.filter(list, function(item) {
|
||||
var val = item.name
|
||||
var val2 = item.isoCode;
|
||||
return lodash.includes(val.toLowerCase(), search.toLowerCase()) || lodash.includes(val2.toLowerCase(), search.toLowerCase());
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
placeholder="{{'Search your currency' | translate}}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="list" ng-if="lastUsedPopularList[0]">
|
||||
<div class="list" ng-if="lastUsedPopularList[0] && searchedAltCurrency.length == 0">
|
||||
<ion-radio class="alt-currency-radio" ng-repeat="lastUsedAltCurrency in lastUsedPopularList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
|
||||
ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name}} <span class="item-note">{{lastUsedAltCurrency.isoCode}}</span>
|
||||
</ion-radio>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue