-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable still propagating endless onLazyLoad events - previous case #1434 #1502
Comments
same issue here, lazy loading and filters are enabled. Without a filter value everything works fine, but after setting a filter value it loads the filtered content once and as soon as you try to navigate to the second page the loop begins. It also resets the "first" value to 0. |
I have add an example for this issue: http://plnkr.co/edit/3643a4 |
Fix checked in. |
Filter on primeng datatable with lazy load is looping the lazyload! Any help? primeng - 4.0.0 RC 2 |
@cagataycivici same here as @shajeeck |
but when enabling immutable mode on the table the problem is solved :) #2044 |
With [immutable]="true" the event it's called twice. Thanks |
[immutable] is removed in 4.0, please see the blog post for details. https://www.primefaces.org/primeng-4-0-0-rc4-released/ We've received feedback that this is fixed with 4.0 as well. |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/NtWWnN
Current behavior
Same as #1434 which was marked as fixed for 1.0.1. A Datatable with lazyLoad=true and a filter with a value propagates endless onLazyLoad events when the Datatable's underlying data array is altered e.g. items added or removed. The problem is in the ngDoCheck function where the lazyLoad check still calls the filter function:
if (this.hasFilter()) { if (this.lazy) { //prevent loop if (this.stopFilterPropagation) this.stopFilterPropagation = false; else this.filter(); } else { this.filter(); }
Expected behavior
The component should create one onLazyLoad event. Removing the call to this.filter within the lazyLoad check fixes the problem.
if (this.hasFilter()) { if (this.lazy) { //prevent loop if (this.stopFilterPropagation) this.stopFilterPropagation = false; //else //this.filter(); } else { this.filter(); }
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
See previous case (#1434)
Please tell us about your environment:
See previous case (#1434)
See previous case (#1434)
1.0.1
See previous case (#1434)
See previous case (Lazy Loading looping issue #1434)
node --version
=See previous case (Lazy Loading looping issue #1434)
The text was updated successfully, but these errors were encountered: