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

Paginate double fetches data and wrong item display #16

Closed
Wtower opened this issue Dec 19, 2016 · 0 comments
Closed

Paginate double fetches data and wrong item display #16

Wtower opened this issue Dec 19, 2016 · 0 comments
Assignees

Comments

@Wtower
Copy link
Owner

Wtower commented Dec 19, 2016

The paginator double fetches data because:

  • The parent component has called fetch data once to obtain record count
  • Paginator $doCheck calls rePaginate
  • rePaginate forces data refresh

Therefore, add a variable in rePaginate to optionally fetch data and check in $doCheck if it is initial call.

Additionally, when viewing the last page (eg items 31-35), the paginator displays 31-40.

@Wtower Wtower self-assigned this Dec 19, 2016
@Wtower Wtower changed the title Paginate double fetches data Paginate double fetches data and wrong item display Dec 19, 2016
@Wtower Wtower closed this as completed in 5136caf Dec 19, 2016
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

No branches or pull requests

1 participant