Add is-loading to search input
This commit is contained in:
parent
5d924744de
commit
e5e388d61e
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user