ngx-infinite-scroll
ngx-infinite-scroll copied to clipboard
ScrollUp jump to 0 again, after loading data
Hi
onScrollUp
event when it trigger if the position of scroll be 0 befror loading data then it jump to position 0 again immediately after data loaded to the container
Yes I have the same issue
same issue
I was using whatsapp web client, and I noticed that they have the same issue, I guess there might be a hack to fix it but it's most likely an issue on the browser level.
Yes I have the same issue. and this issue only in Prod build. on dev build is ok
"@angular/core": "^10.0.5", "ngx-infinite-scroll": "^9.0.0",
Facing the same issue. If the binded array is updated using unshift the scroll set itself to the top position and does not remain in the previous position
is this issue solved
@orizens any update on this? At least, please just let us know if you are planning to resolve this and how long it may take.
@zeinali0 please share a reproduction by cloning the demo
also @zeinali0 a possible workaround is to not render the container with ngx-is if there's no data.
To reproduce the issue, i start from the exemple I add the code below into the constructor.
of(null).pipe(
delay(1000)
).subscribe(() => {
this.prependItems(0, this.sum);
});
Before delay prepend items, if we scroll even a little, datas will be added and we keep position we are. If we didn't scroll, datas added and keep positioning at the top of the list. So, we lose previous position we are before adding datas.
Any update on this?
+1
+1
same, i'm using (scrolled) and (scrolledUp) to force show only MAX 30 items inside a div out of a bunch items
- when (scrolled) is triggered => i push more 15 items then splice() to remove first 15 items
- when (scrolledUp) is triggered => i unshift more 15 items then splice() to remove last 15 items
it work perfect on Android mobile but it will keep scrollTop=0 after (scrolledUp) on iPhone
Any update ?