From 473824a57480d7c2eedc9be55623f321ee1f31b0 Mon Sep 17 00:00:00 2001 From: Sylvain UTARD Date: Tue, 15 Mar 2016 11:37:53 +0100 Subject: [PATCH] fix(autocomplete): auto select top result Use autocomplete.js's autoselect=true option to select the top suggestion on even if you don't move the cursor. Fix #81 --- src/lib/DocSearch.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/DocSearch.js b/src/lib/DocSearch.js index 82c47bad..13b9e899 100644 --- a/src/lib/DocSearch.js +++ b/src/lib/DocSearch.js @@ -39,7 +39,8 @@ class DocSearch { }, autocompleteOptions = { debug: false, - hint: false + hint: false, + autoselect: true } }) { DocSearch.checkArguments({apiKey, indexName, inputSelector, algoliaOptions, autocompleteOptions});