diff --git a/editor/src/search.js b/editor/src/search.js index 428dffe..a4aeca1 100644 --- a/editor/src/search.js +++ b/editor/src/search.js @@ -6,6 +6,7 @@ function search(element) { resolve({ element: element, search(query) { + element.classList.add('is-loading') return fetch('/search/?' + qs.encode({q:query})) .then(res => res.json()) .then(data => { @@ -16,6 +17,7 @@ function search(element) { title: value.id.replace(/_/g, ' '), }) }) + element.classList.remove('is-loading') return actualResult }) }