Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtakoe committed Sep 4, 2015
1 parent 6bf5356 commit 8f47e01
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions docs/examples/customization/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ <h2>Customization</h2>
}"
</div>
<div hljs>
.filter('mySearchFilter', ['$sce', function($sce) {
return function(label) {
.filter('mySearchFilter', function($sce) {
return function(label, query, item, options) {

var html = '<i>' + label + '</i>';

return $sce.trustAsHtml(html);
};
}])
})
</div>
<div hljs>
.filter('myDropdownFilter', ['$sce', function($sce) {
return function(label, query, option) {
.filter('myDropdownFilter', function($sce) {
return function(label, query, item, options) {

var html = '<kbd>#' + option.id + '</kbd> ' + label;
var html = '<kbd>#' + item.id + '</kbd> ' + label;

return $sce.trustAsHtml(html);
};
}]);
});
</div>
<div hljs>
.filter('myListFilter', function() {
return function (list, query, getLabel) {
return function (list, query, getLabel, options) {
return list;
}
});
Expand Down
12 changes: 6 additions & 6 deletions src/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,16 @@ angular.module('oi.select')
}
};

scope.getSearchLabel = function(option) {
var label = getLabel(option);
scope.getSearchLabel = function(item) {
var label = getLabel(item);

return searchFilter(label, scope.oldQuery || scope.query, option, searchFilterOptionsFn(scope.$parent));
return searchFilter(label, scope.oldQuery || scope.query, item, searchFilterOptionsFn(scope.$parent));
};

scope.getDropdownLabel = function(option) {
var label = getLabel(option);
scope.getDropdownLabel = function(item) {
var label = getLabel(item);

return dropdownFilter(label, scope.oldQuery || scope.query, option, dropdownFilterOptionsFn(scope.$parent));
return dropdownFilter(label, scope.oldQuery || scope.query, item, dropdownFilterOptionsFn(scope.$parent));
};

scope.getDisableWhen = getDisableWhen;
Expand Down

0 comments on commit 8f47e01

Please sign in to comment.