mirror of
https://gitee.com/dcren/initializr.git
synced 2026-02-26 05:32:58 +08:00
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:
committed by
Stephane Nicoll
parent
524cc5d979
commit
e74e65b3bf
@@ -141,7 +141,8 @@ $(function () {
|
|||||||
initializeSearchEngine(starters, $("#bootVersion").val());
|
initializeSearchEngine(starters, $("#bootVersion").val());
|
||||||
$('#autocomplete').typeahead(
|
$('#autocomplete').typeahead(
|
||||||
{
|
{
|
||||||
minLength: 2
|
minLength: 2,
|
||||||
|
autoSelect: true
|
||||||
}, {
|
}, {
|
||||||
name: 'starters',
|
name: 'starters',
|
||||||
display: 'name',
|
display: 'name',
|
||||||
@@ -200,4 +201,4 @@ $(function () {
|
|||||||
e.returnValue = false;
|
e.returnValue = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user