handle isLoading
This commit is contained in:
parent
20a6dc10bf
commit
2978c43bb7
|
|
@ -2,4 +2,7 @@
|
||||||
.card-grid-container {
|
.card-grid-container {
|
||||||
@apply pt-2;
|
@apply pt-2;
|
||||||
}
|
}
|
||||||
|
.card-grid-container[isLoading] {
|
||||||
|
@apply opacity-30;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,11 @@ async function filterPosts(e) {
|
||||||
filterButtons.forEach((button) => {
|
filterButtons.forEach((button) => {
|
||||||
button.classList.remove('filters-toolbar__action-button--active');
|
button.classList.remove('filters-toolbar__action-button--active');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const newsContainer = document.querySelector('.news-container .card-grid-container');
|
||||||
|
newsContainer.setAttribute('isLoading', true);
|
||||||
await hydrateNewsFeedByTypeId(filterID, termName);
|
await hydrateNewsFeedByTypeId(filterID, termName);
|
||||||
|
newsContainer.removeAttribute('isLoading');
|
||||||
|
|
||||||
e.target.classList.add('filters-toolbar__action-button--active');
|
e.target.classList.add('filters-toolbar__action-button--active');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user