Scrollbar updater

This commit is contained in:
Corban-Lee Jones 2024-01-22 11:51:10 +00:00
parent c32eb91d03
commit 62bd7de0be
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,10 @@
var scrollables = $(".scrollable");
if (scrollables.length > 0) {
scrollables.each(function(index, el) {
new PerfectScrollbar(el);
var scrollbar = new PerfectScrollbar(el);
$(el).on("updateScrollbar", function() {
scrollbar.update();
})
});
}
})();

View File

@ -18,6 +18,7 @@ $(document).ready(function() {
function updateItemsState(state) {
console.debug(`updating items state to '${state}'`);
$("#ticketsContainer").scrollTop(0);
$("#ticketsContainer").trigger("updateScrollbar");
switch (state) {
case "content":