Fix - 315 - Currency search doesn't work when entering from Settings

This commit is contained in:
Jean-Baptiste Dominguez 2018-05-10 12:23:44 +09:00
commit eced42806d
2 changed files with 5 additions and 2 deletions

View file

@ -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());