Hi,
I found that when using infinite scroll that if I load an initial list and trigger the scrolled event that this obviously works fine. But if I then reset the array to empty and load the initial 100 items again then the scrolled event never seems to trigger after that (I think it's still expecting me to be able to scroll down as far as the items it loaded before I emptied the array?) (Think this might be the same issue as https://github.com/orizens/ngx-infinite-scroll/issues/236)
I've amended your plunkr to demonstrate the issue I'm having - to recreate:
https://plnkr.co/edit/VCfFWgyKPSqjoKoc4bnc?p=preview
I have the same issue when changing the date range I am showing results for/ordering the columns because everytime we reset the array and display only the initial data again.
Thanks in advance for your help.
hi @vickieallen
you're right - this behavior happens.
i'm not sure whether this is a bug or related to the responsibility of ngx-infinite-scroll.
will need to think how to tackle this one.
for future reference or pr
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
Hi @orizens,
I had seen this issue by luck and I think it's the same thing than me with the ordering of column as mentioned by the author.
So I close my issue #230 because in this issue, you have a proof of the problem
@vickieallen since the content is changing - i can suggest to disable and enable the infinite-scroll again.
closing as - this issue (a resize event) is linked to this problem
https://github.com/orizens/ngx-infinite-scroll/issues/91
@vickieallen since the content is changing - i can suggest to disable and enable the infinite-scroll again.
How do I do that?
@vickieallen since the content is changing - i can suggest to disable and enable the infinite-scroll again.
How do I do that?
use infinitScrollDisabled input
@marcvannieuwenhuijzen @chaouiy This worked for me but because I was doing the sorting locally I needed to set a timeout for about 500ms before re-enabling the infinite scroll. Have you found a better workaround?
@fyidev I invoke this._changeDetector.detectChanges(); instead of setTimeout()
It works for me.
Most helpful comment
@vickieallen since the content is changing - i can suggest to disable and enable the infinite-scroll again.