Merge pull request #52 from algolia/fix/51
fix(handleSelected): ensure we're calling setVal on the right object
This commit is contained in:
commit
d6f80ae45c
1 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ class DocSearch {
|
|||
footer: templates.footer
|
||||
}
|
||||
}]);
|
||||
this.autocomplete.on('autocomplete:selected', this.handleSelected);
|
||||
this.autocomplete.on('autocomplete:selected', this.handleSelected.bind(null, this.autocomplete.autocomplete));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -161,8 +161,8 @@ class DocSearch {
|
|||
};
|
||||
}
|
||||
|
||||
handleSelected(event, suggestion) {
|
||||
this.autocomplete.autocomplete.setVal('');
|
||||
handleSelected(input, event, suggestion) {
|
||||
input.setVal('');
|
||||
window.location.href = suggestion.url;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue