1 year ago
#348653
emka26
Infinity scroll in ng-select - problem with load from server
I'm using ng-select in my project and I should load items for this select from server.
I have also pagination, so I should load more items when scroll is close to the end of dropdown. And that's the problem because I can use (scrollToEnd)="", but this event is fire when scroll is on the bottom. And when at this moment I call backend, I have to wait for response, so there is moment when nothing happen and for user isn't really friendly.
Ideally i would like to set some distance like is eg in ngx-infinite-scroll, and call this event eg on 80% of scroll.
How can I achieve this? How can I catch the moment when scroll is close to the bottom but not exactly on the bottom?
angular
infinite-scroll
angular-ngselect
0 Answers
Your Answer