I have incorporated the infinite scroll feature from version 1.1.0 into my project. The scenario involves a table where contents are loaded dynamically as the user scrolls down.
A similar implementation can be seen in this example, where data is added to an array and displayed inside a div, functioning as expected.
However, when attempting to replicate this on another page, I noticed that the showMore()
function is triggered not only on scrolling down but also on scrolling up. Below is the structure of the table:
<table>
<thead>
<tr>
<th>Some heading</th>
<th>Some other heading</th>
</tr>
</thead>
<tbody>
<div infinite-scroll="showMore()" infinite-scroll-distance="3" infinite-scroll-disabled='infiniteScrollDisabled'>
<tr ng-repeat="r in report">
<td>{{$index}}</td>
<td">{{r.someData}}</td>
</tr>
</div>
</tbody>
</table>
I am perplexed as to why the showMore()
function is executed even upon scrolling up. Could it possibly be related to the structure of the table? Any insights would be appreciated.