You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to add a "loading" state class to the autocomplete input that could be used to add for example a background spinner to indicate that the autocomplete is loading data. This can be done easily with this code in the startFetch function:
input.classList.add('ac-loading'); // new code
settings.fetch(inputText, function (elements) {
if (fetchCounter === savedFetchCounter && elements) {
input.classList.remove('ac-loading'); // new code
Then it can be used with CSS code like this:
.ac-loading {
background-image: url('path to spinner image');
background-size: 25px 25px;
background-position: right 10px center;
background-repeat: no-repeat;
}
The text was updated successfully, but these errors were encountered:
prigaux
added a commit
to UnivParis1/autocomplete
that referenced
this issue
Jan 8, 2024
It would be useful to add a "loading" state class to the autocomplete input that could be used to add for example a background spinner to indicate that the autocomplete is loading data. This can be done easily with this code in the
startFetch
function:Then it can be used with CSS code like this:
The text was updated successfully, but these errors were encountered: