Skip to content
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

Paginated & lazy loaded TurboTable should not truncate rows added manually #6634

Closed
danielthegray opened this issue Oct 4, 2018 · 2 comments
Assignees
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

Comments

@danielthegray
Copy link
Contributor

I'm submitting a ... (check one with "x")

[ ] 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
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

@danielthegray danielthegray changed the title Paginated & lazy loaded TurboTable truncates rows added manually Paginated & lazy loaded TurboTable should not truncate rows added manually Oct 4, 2018
@cagataycivici cagataycivici self-assigned this Oct 11, 2018
@cagataycivici cagataycivici added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add Status: Pending Review Issue or pull request is being reviewed by Core Team labels Oct 11, 2018
@cagataycivici cagataycivici added this to the 6.1.5 milestone Oct 11, 2018
cagataycivici added a commit that referenced this issue Oct 12, 2018
…te_rows

Make TurboTable not slice rows list if lazy loaded (fix #6634)
@cagataycivici
Copy link
Member

This may break some apps maybe not sure but it sounds right, if an app is broken it might reveal that the loading is not implemented properly at the app side. From the point of view of the table, I also agree that it does not make sense to slice a lazy table. Merged, let's see how it goes :)

@danielthegray
Copy link
Contributor Author

Thank you very much! This will make my life so much easier! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants