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

Fix(recordsTotal): do not use search string for total count #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ghybs
Copy link

@ghybs ghybs commented Mar 7, 2018

Hi,

This PR fixes #21

It adds a new parameter to buildCountStatement and buildWherePartial private functions, so that we can differentiate recordsTotal and recordsFiltered built queries.

See it in action: https://plnkr.co/edit/4VHcTgRzFziLQ9K8RUST?p=preview

otherwise both recordsTotal and recordsFiltered have the same query, therefore the same count result.
otherwise the select query is broken, since it no longer accounts for the search string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Counts for total and filtered are the same
1 participant