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

Pagination options - infoFn shows incorrect data. totalPage parameter is always undefined. #853

Open
1 task done
dipanshusabharwal opened this issue May 13, 2021 · 1 comment

Comments

@dipanshusabharwal
Copy link
Contributor

Issue Type (delete the irrelevant ones)

  • Bug

Specs

What version are you using?
2.21.10

What browser?
Chrome Version 90.0.4430.212 (Official Build) (64-bit)

Expected Behavior

What did you expect to happen?
The parameter - totalPage in the info-fn pagination options should return valid value.

Actual Behavior

What actually happened?
The parameter - totalPage is returning undefined.

Steps to Reproduce the Problem

I am trying to implement my own function to layout pagination information.

Steps :

  1. Run the app using the basic example from getting started documentation.
  2. Set your own page labels and pagination info function under the pagination-options.
  3. Add the following line in pagination-options of your app, so that you use totalPage paramter :
infoFn: (params) =>
`Showing ${params.firstRecordOnPage} to ${params.lastRecordOnPage} of page ${params.currentPage} out of ${params.totalPage} pages. Total Records: ${params.totalRecords}`,

image

jsfiddle

If you provide a jsfiddle reproducing the issue, it'll be addressed much faster.
you can use this as base

https://jsfiddle.net/mkx60gp7/

@aditsud
Copy link

aditsud commented Sep 5, 2021

use ${params.totalPages} instead of ${params.totalPage}

it works

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

2 participants