f5ff096d78
This commit moves our service list into a new presentational component, and is therefore mainly just moving things around. The main thing moved here is the logic required to resizing columns correctly is now moved to a component instead of the controller
23 lines
605 B
JavaScript
23 lines
605 B
JavaScript
import Controller from '@ember/controller';
|
|
import { get, computed } from '@ember/object';
|
|
import WithEventSource from 'consul-ui/mixins/with-event-source';
|
|
import WithSearching from 'consul-ui/mixins/with-searching';
|
|
export default Controller.extend(WithEventSource, WithSearching, {
|
|
queryParams: {
|
|
s: {
|
|
as: 'filter',
|
|
},
|
|
},
|
|
init: function() {
|
|
this.searchParams = {
|
|
service: 's',
|
|
};
|
|
this._super(...arguments);
|
|
},
|
|
searchable: computed('items.[]', function() {
|
|
return get(this, 'searchables.service')
|
|
.add(this.items)
|
|
.search(this.terms);
|
|
}),
|
|
});
|