Skip to content

Commit

Permalink
Fixes #9625 - Searching icons for "box" returns all icons (#9848)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef authored Feb 21, 2021
1 parent 82701fb commit 01991db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ function IconPickerController($scope, localizationService, iconHelper) {

var vm = this;

vm.filter = {
searchTerm: ''
};

vm.selectIcon = selectIcon;
vm.selectColor = selectColor;
vm.submit = submit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="umb-control-group">
<umb-search-filter
input-id="icon-search"
model="searchTerm"
model="vm.filter.searchTerm"
label-key="placeholders_filter"
text="Type to filter..."
css-class="w-100"
Expand All @@ -42,7 +42,7 @@

<div class="umb-control-group" ng-show="!vm.loading && filtered.length > 0 ">
<ul class="umb-iconpicker" ng-class="vm.color.value" ng-show="vm.icons">
<li class="umb-iconpicker-item" ng-class="{'-selected': icon.name == model.icon}" ng-repeat="icon in filtered = (vm.icons | filter: searchTerm | orderBy:'name') track by $id(icon)">
<li class="umb-iconpicker-item" ng-class="{'-selected': icon.name == model.icon}" ng-repeat="icon in filtered = (vm.icons | filter: { 'name': vm.filter.searchTerm } | orderBy:'name') track by $id(icon)">
<button type="button" title="{{icon.name}}" ng-click="vm.selectIcon(icon.name, vm.color.value)">
<umb-icon class="umb-iconpicker-svg {{icon.name}} large" icon="{{icon.name}}"></umb-icon>
<span class="sr-only"><localize key="buttons_select">Select</localize> {{icon.name}}</span>
Expand Down

0 comments on commit 01991db

Please sign in to comment.