mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-03 22:23:37 +00:00
minor refactor
This commit is contained in:
parent
308debaba1
commit
f8d4e45447
@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user