[autocomplete] only render the top 100 results
This commit is contained in:
parent
05d137cd6d
commit
8007ed8532
1 changed files with 2 additions and 2 deletions
|
@ -92,8 +92,8 @@ function renderCompletions(element) {
|
|||
completions_el.className = 'autocomplete_completions';
|
||||
completions_el.id = 'completions';
|
||||
|
||||
// add children for each completion, with the selected one highlighted
|
||||
Object.keys(completions).forEach((key, i) => {
|
||||
// add children for top completions, with the selected one highlighted
|
||||
Object.keys(completions).slice(0, 100).forEach((key, i) => {
|
||||
let value = completions[key];
|
||||
let li = document.createElement('li');
|
||||
li.innerText = key + ' (' + value + ')';
|
||||
|
|
Reference in a new issue