primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.64k stars 4.63k forks source link

[p-scroller] - Lazy loading + delay lead to infinite loading #16263

Open MaewenPelletier opened 3 months ago

MaewenPelletier commented 3 months ago

Describe the bug

Can be reproduce on the demo page of p-scroller https://primeng.org/scroller#lazy-load

Go on the lazy list, scroll down then scroll up to the previous location before the call resolve (the delay parameter 250 in the example)

You are stuck in a infinite loading :

image

Environment

Bug is present on local (16.9.1) and in the stackblitz provided on the primeng doc aswell ( "primeng": "17.18.9")

Reproducer

https://stackblitz.com/edit/b43ssr-rbmhom?file=package.json

Angular version

17

PrimeNG version

17

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16

Browser(s)

No response

Steps to reproduce the behavior

cf introduction

Expected behavior

It should not display the loader but the data

SPKorhonen commented 2 months ago

I think I've encountered the same problem in 17.18.x

I think I've isolated the problem into onScrollPositionChange.

MaewenPelletier commented 1 month ago

@SPKorhonen thansk for the informations !

Maybe completely unrelated but I experienced weird behavior using delay or async with primeng, using ngZone.run(...) solved the problem on other issues.

What your toughs is it something interesting to dig in ?