primefaces / primeng

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

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

Open MaewenPelletier opened 1 month ago

MaewenPelletier commented 1 month 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 3 days ago

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

I think I've isolated the problem into onScrollPositionChange.