[autocomplete] only render the top 100 results

This commit is contained in:
Shish 2023-12-29 11:00:56 +00:00
parent 05d137cd6d
commit 8007ed8532

View file

@ -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 + ')';