fix(handleSelected): ensure we're calling setVal on the right object
Fix #51
This commit is contained in:
parent
c0633e51bf
commit
31abbd7400
1 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ class DocSearch {
|
||||||
footer: templates.footer
|
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) {
|
handleSelected(input, event, suggestion) {
|
||||||
this.autocomplete.autocomplete.setVal('');
|
input.setVal('');
|
||||||
window.location.href = suggestion.url;
|
window.location.href = suggestion.url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue