Closed danielyewright closed 7 years ago
Yes, you have access to 3 variables that you can use to do the math: currentPage
, pageSize
and totalItems
. When you setup the table you provide this variables like this:
aurelia-table="data.bind: users; display-data.bind: $displayData;
current-page.bind: currentPage;
page-size.bind: pageSize;
total-items.bind: totalItems;"
This properties get updated as you navigate the table so just create a getter function that retturns the String with the pagination info and use those properties to calculate it.
Is there a way to display the indexes of items on the current page?
For example, displaying
Showing 1-10 of 100
and when navigating to the next page displayShowing 11-20 of 100
, and so on.