minor refactor

This commit is contained in:
cptran777 2018-04-27 13:26:38 -07:00
parent 308debaba1
commit f8d4e45447
2 changed files with 3 additions and 6 deletions

View File

@ -60,12 +60,9 @@ export default Component.extend({
* Triggers a search action by the user pressing enter on a typeahead suggestion
* @param {string} suggestion - suggestion text passed in from aupac-typeahead
*/
selectedSuggestion(suggestion) {
onSelectedSuggestion(suggestion) {
set(this, 'search', suggestion);
get(this, 'didSearch')({
keyword: suggestion,
category: get(this, 'currentFilter')
});
this.actions.search.call(this);
},
/**

View File

@ -3,7 +3,7 @@
<label for="search-input" class="sr-only">Search</label>
{{aupac-typeahead
action=(action "selectedSuggestion")
action=(action "onSelectedSuggestion")
autoFocus=true
allowFreeInput=true
source=(action "onInput")