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

@ -19,7 +19,7 @@
this.event.unbindAll(),e(this.scrollbarX),e(this.scrollbarY),e(this.scrollbarXRail),e(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(a){return!a.match(/^ps([-_].+|)$/)}).join(" ")},H});
//# sourceMappingURL=perfect-scrollbar.min.js.map
//
// Custom code to activate scrollbars
//
@ -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":