OnLazyLoad with VirtualScroll is loading double the [rows] intital value
[ 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]
This is by design for smooth scrolling.
You mention this is design for smooth scrolling but causes a bug with pagination since it loads double