Auto-select first autocompletion entry

Because this feature is not natively supported by Twitter Typeahead,
this is based on a existing PR.
See twitter/typeahead.js#1356

See gh-145
This commit is contained in:
Brian Clozel 2015-10-05 17:29:46 +02:00 committed by Stephane Nicoll
parent 524cc5d979
commit e74e65b3bf
2 changed files with 5 additions and 4 deletions

View File

@ -141,7 +141,8 @@ $(function () {
initializeSearchEngine(starters, $("#bootVersion").val());
$('#autocomplete').typeahead(
{
minLength: 2
minLength: 2,
autoSelect: true
}, {
name: 'starters',
display: 'name',
@ -200,4 +201,4 @@ $(function () {
e.returnValue = false;
}
});
});
});

File diff suppressed because one or more lines are too long