Skip to content

Commit 0701b91

Browse files
better HPO menu
1 parent d066b6c commit 0701b91

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/historeport/static/historeport.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ pheno_terms_tag.on("input", onInput);
4545
// Tagify AJAX Function to get a list of HPO terms
4646
var delayTimer;
4747
function onInput(e) {
48+
pheno_terms_tag.whitelist = null; // reset the whitelist
49+
// show loading animation and hide the suggestions dropdown
50+
pheno_terms_tag.loading(true).dropdown.hide();
4851
clearTimeout(delayTimer);
4952
delayTimer = setTimeout(function () {
5053
var value = e.detail.value;
51-
pheno_terms_tag.whitelist = null; // reset the whitelist
52-
// show loading animation and hide the suggestions dropdown
53-
pheno_terms_tag.loading(true).dropdown.hide();
54-
5554
fetch(
5655
"https://hpo.jax.org/api/hpo/search/?q=" +
5756
value +
@@ -67,7 +66,7 @@ function onInput(e) {
6766
}
6867
pheno_terms_tag.whitelist = terms_list;
6968
pheno_terms_tag.loading(false);
70-
pheno_terms_tag.dropdown.show(terms_list); // render the suggestions dropdown
69+
pheno_terms_tag.dropdown.show(); // render the suggestions dropdown
7170
});
7271
}, 700);
7372
}

0 commit comments

Comments
 (0)