Limit № of autocomplete results so the list doesn't fall off the screen

(imported from commit 311376c1dec35a16ddfb66fc01161501c2eafff0)
This commit is contained in:
Luke Faraone 2012-09-19 13:10:09 -04:00
parent d8c243dbe2
commit fed4cd3891

View File

@ -608,14 +608,18 @@ function update_autocomplete() {
instance_list.sort();
people_list.sort();
// limit number of items so the list doesn't fall off the screen
$( "#class" ).typeahead({
source: class_list
source: class_list,
items: 3,
});
$( "#instance" ).typeahead({
source: instance_list
source: instance_list,
items: 2,
});
$( "#recipient" ).typeahead({
source: people_list
source: people_list,
items: 4,
});
}