Currently, I have implemented infinite scrolling on a table and it is functioning properly.
<tbody infinite-scroll-disabled="myModule.isScrollingDisabled()" infinite-scroll="myModule.nextPage()" infinate-scroll-immediate-check="false" infinite-scroll-distance="3">
However, I am facing an issue when trying to stop the infinite scrolling on a click event triggered by a checkbox. In my code, I have a method called isScrollingDisabled
.
myModule.prototype.isScrollingDisabled = function() {
return this.disabledScroll;
};
Additionally, I have a setter function that gets executed each time the checkbox is clicked, updating the disabledScroll
flag accordingly.
myModule.prototype.toggleScrollingDisabled = function(status) {
this.disabledScroll = status;
};
Upon page refresh, the isScrollingDisabled
method does not get called again. I am looking for a way to trigger it in order to retrieve the state of disabledScroll
and then enable or disable the scrolling functionality.
Although I can modify the value of the infinite-scroll-disabled
attribute using basic JavaScript, this does not impact the scrolling behavior. Angular ceases to watch the attribute, the parsing is completed, and the event remains untriggered.