X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/8833b5bc3bc717c0303fb1a61a15c97f10b283ae..refs/pull/3573/head:/resources/js/components/dropdown-search.js diff --git a/resources/js/components/dropdown-search.js b/resources/js/components/dropdown-search.js index 8c81aae3c..81fa940c2 100644 --- a/resources/js/components/dropdown-search.js +++ b/resources/js/components/dropdown-search.js @@ -1,4 +1,5 @@ import {debounce} from "../services/util"; +import {transitionHeight} from "../services/animations"; class DropdownSearch { @@ -27,6 +28,7 @@ class DropdownSearch { this.runLocalSearch(input); } else { this.toggleLoading(true); + this.listContainerElem.innerHTML = ''; this.runAjaxSearch(input); } } @@ -50,7 +52,9 @@ class DropdownSearch { try { const resp = await window.$http.get(this.getAjaxUrl(searchTerm)); + const animate = transitionHeight(this.listContainerElem, 80); this.listContainerElem.innerHTML = resp.data; + animate(); } catch (err) { console.error(err); }