Paginated & lazy loaded TurboTable should not truncate rows added manually #6634
Labels
Status: Pending Review
Issue or pull request is being reviewed by Core Team
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Current behavior
Currently, a lazy loaded & paginated TurboTable is slicing the rows array (passed in via the
value
attribute) and limiting it to only have the number of rows. In my app I manually add some rows (temporarily) and any row(s) I add in (temporarily) to the view push out the bottom rows, which is not the desired behavior.Expected behavior
I would like the rows in a lazy loaded table to be left as they are, allowing the addition of any number of rows to the view without having to worry about changing the page size and ruining future queries. If the TurboTable is lazy-loaded, it should completely delegate the filling of the table to the callback and not limit the number of rows to be displayed.
What is the motivation / use case for changing the behavior?
Currently the component is doing superfluous (and in my case, limiting) work which makes the component less flexible than it should be. The change would be simply to limit the slicing to cases where the pagination is handled by the component and not by the lazy-load call back. It's a very simple change which will save the component the work of slicing and allow the component flexibility for more diverse use-cases.
Please tell us about your environment:
all
Angular version: 6.1.4
PrimeNG version: 6.1.4
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
Language: [all | TypeScript X.X | ES6/7 | ES5]
all
The text was updated successfully, but these errors were encountered: