You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
Using datatable with virtual scrolling and lazy loading and subsequently setting data inside of onLazyLoad which is then used in templates causes to the Angular 4.x. expression changed exception. This is a problem for dev builds and karma unit testing.
Hint: currently circumventing by embedding the onLazyLoad code in a setTimeout call.
Expected behavior
onLazyLoad should be called outside of change detection context i.e. it should be possible to set data in onLazyLoad without resorting to timeouts etc.
What is the motivation / use case for changing the behavior?
DataTabe with lazy loading is very useful, but broken tests prevent it from being tested properly.
** Repro **
Set the data actually being used in dataTable in onLazyLoad e.g. data = [1,2,3,4] and total = data.length and use it in the template e.g. {{ total }}. In dev build it should cause the exception and it should work alright when embedded in setTimeout.
Please tell us about your environment:
Windows 10, npm, ng console.
Angular version: 4.2.5
PrimeNG version: 4.1.0-rc.3
Browser: Chrome
Language: TypeScript 2.3
Node (for AoT issues):node --version = v6.10.3
The text was updated successfully, but these errors were encountered:
Same issue here.
Throws "Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'NaNpx'. Current value: '0px'".
I'm submitting a ... (check one with "x")
Current behavior
Using datatable with virtual scrolling and lazy loading and subsequently setting data inside of onLazyLoad which is then used in templates causes to the Angular 4.x. expression changed exception. This is a problem for dev builds and karma unit testing.
Hint: currently circumventing by embedding the onLazyLoad code in a setTimeout call.
Expected behavior
onLazyLoad should be called outside of change detection context i.e. it should be possible to set data in onLazyLoad without resorting to timeouts etc.
What is the motivation / use case for changing the behavior?
DataTabe with lazy loading is very useful, but broken tests prevent it from being tested properly.
** Repro **
Set the data actually being used in dataTable in onLazyLoad e.g. data = [1,2,3,4] and total = data.length and use it in the template e.g. {{ total }}. In dev build it should cause the exception and it should work alright when embedded in setTimeout.
Please tell us about your environment:
Windows 10, npm, ng console.
Angular version: 4.2.5
PrimeNG version: 4.1.0-rc.3
Browser: Chrome
Language: TypeScript 2.3
Node (for AoT issues):
node --version
= v6.10.3The text was updated successfully, but these errors were encountered: