FEATURE: User admin - filter groups as you type (#4171)

* FEATURE: User admin - filter groups as you type

* Fix use of undefined parameter
This commit is contained in:
Dean Taylor 2016-04-14 15:40:09 +01:00 committed by Robin Ward
parent 4419d50780
commit 5cd0ce0019
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ export default Ember.Component.extend({
multiple: true,
width: '100%',
query: function(opts) {
opts.callback({ results: this.get("available").map(this._format) });
opts.callback({
results: this.get("available").filter(function(o) {
return -1 !== o.name.toLowerCase().indexOf(opts.term.toLowerCase());
}).map(this._format)
});
}.bind(this)
}).on("change", function(evt) {
if (evt.added){