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

if last_row is present in remote data, don't require last_page #4654

Open
liedekef opened this issue Dec 10, 2024 · 0 comments
Open

if last_row is present in remote data, don't require last_page #4654

liedekef opened this issue Dec 10, 2024 · 0 comments
Labels
Suggested Feature A suggested feature that is waiting review

Comments

@liedekef
Copy link

Is your feature request related to a problem? Please describe.
Currently, for paging, the remote side needs to give at least last_page and for correctness also last_row.
This means a php-solution that gets info from mysql needs to get the count (last_row) and then calculate the total amount of pages too.

Describe the solution you'd like
Most table-solutions require only the total record count (last_row), and when that is present, last_page can be calculated in javascript.
Since in php all solutions do a count(*) to get the total rows, it is more logical to set last_row than to also need to do the page calc on server side.
I've verified that last_page is only used in _parseRemoteData and can be calculated if last_row is present. This is about 5 lines of code-change :-)

@liedekef liedekef added the Suggested Feature A suggested feature that is waiting review label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggested Feature A suggested feature that is waiting review
Projects
None yet
Development

No branches or pull requests

1 participant