diff --git a/.eslintrc.js b/.eslintrc.js index f3c9d4f..d99d7d2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,7 +21,9 @@ module.exports = { browser: true }, rules: { - 'ember/no-jquery': 'error' + 'ember/no-jquery': 'off', + 'ember/no-new-mixins': 'off', + 'ember/no-observers': 'off' }, overrides: [ // node files diff --git a/app/components/duke-ds-user-search-fields.js b/app/components/duke-ds-user-search-fields.js index 6fc2de9..3cd92cc 100644 --- a/app/components/duke-ds-user-search-fields.js +++ b/app/components/duke-ds-user-search-fields.js @@ -1,5 +1,6 @@ import { set } from '@ember/object'; import Component from '@ember/component'; +import { action } from '@ember/object'; const KINDS = [ {mode: 'full_name_contains', name: 'Name', placeholder: 'Full or Partial Name'}, @@ -16,14 +17,13 @@ export default Component.extend({ kinds: KINDS, kind: null, onSearch: () => {}, // Default implementation - actions: { - search() { - let params = {}; - const query = this.get('query'); - const mode = this.get('kind.mode'); - set(params, mode, query); - this.get('onSearch')(params); - } + @action + search() { + let params = {}; + const query = this.get('query'); + const mode = this.get('kind.mode'); + set(params, mode, query); + this.get('onSearch')(params); }, didReceiveAttrs() { this._super(...arguments); diff --git a/app/templates/components/duke-ds-user-search-fields.hbs b/app/templates/components/duke-ds-user-search-fields.hbs index 9830257..d7b5d21 100644 --- a/app/templates/components/duke-ds-user-search-fields.hbs +++ b/app/templates/components/duke-ds-user-search-fields.hbs @@ -1,4 +1,4 @@ -