I'm submitting a ...
[ ] bug report => Search github for a similar issue or PR before submitting
[x] 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
In Lazy mode, changing totalRecords does not trigger an onLazyLoad() event. So when the underlying dataset gets filtered outside of the datatable, the table does not get updated.
Desired behavior
I'd like to have a way to trigger an onLazyLoad() event. Either by updating totalRecords or in another way.
Please tell us about your environment:
Angular version: 2.3.X
PrimeNG version: 1.0.1
I found a workaround. Just save the previous LazyLoadEvent and use that to query the changed data.
There is also an undocumented method: createLazyLoadMetadata that returns a new LazyLoadEvent.
Still, I vote to reopen this issue. There should be an API just to reload the table without having to change the sorting, filtering or source data.
reset method does the trick. See methods on page https://www.primefaces.org/primeng/#/datatable
p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.
Most helpful comment
I found a workaround. Just save the previous LazyLoadEvent and use that to query the changed data.