primeng icon indicating copy to clipboard operation
primeng copied to clipboard

OnLazyLoad with VirtualScroll is loading double the [rows] intital value

Open supermoon123 opened this issue 9 years ago • 2 comments

[ x ] bug report => Search github for a similar issue or PR before submitting

Plunkr Case (Bug Reports) https://plnkr.co/edit/Ho4EzY1xi5TBivOa4DmP?p=preview

Current behavior dataTable with onLazyLoad is loading double the [rows] value that was initially set when using [virtualScroll]="true"

Expected behavior dataTable with onLazyLoad and [virtualScroll]="true" is to load the [rows]="10" that was initially set.

Minimal reproduction of the problem with instructions https://plnkr.co/edit/Ho4EzY1xi5TBivOa4DmP?p=preview

1.) Run plnkr project 2.) Review project html [rows]="10" 3.) Review table header records showing (20) out of (50) 4.) Bug only occurs when [virtualScroll]="true" 5.) Removing [virtualScroll]="true" will show the accurate record count.

What is the motivation / use case for changing the behavior? 1.) Accuracy in records displaying and pagination when utlizing [virtualScroll]="true"

Please tell us about your environment:

  • Angular version: 5.0.`

  • PrimeNG version: 5.0.

All

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

supermoon123 avatar Nov 13 '17 22:11 supermoon123

This is by design for smooth scrolling.

cagataycivici avatar Nov 17 '17 10:11 cagataycivici

You mention this is design for smooth scrolling but causes a bug with pagination since it loads double

supermoon123 avatar Nov 20 '17 03:11 supermoon123