Skip to main content
prakhars0731
February 3, 2024
Solved

Custom paging issue

  • February 3, 2024
  • 9 replies
  • 0 views

I have use case in which we show custom pagination  issue is their we have used custom pagination and dropdown on 10,20,50,100

when  I am moving my pagination to last page and with 10 have drop down value it is working fine giving exact deifference that I have between my data in pagination but when I am increasing drop down value to 100

but getting issue their startindex in not moving back.  Like my total data count is 32 

3001-3032 of 3032 is my desired outcome I want like my start index should move back with my dropdown. Can you suggest solution anyone

STEP 1:-

STEP 2 where issue is

Best answer by harshitb6843

I think it is working as expected. Because this new row count should be applied from the current page. So from the User Experience standpoint, this looks right to me. Because let's say you had rows till 3700, then when you start from 3631, it will show you all the rows till 3700 but because you don't have more rows to display, it is not showing any. So this looks correct to me. 

You can also set the startIndex back to 1 if someone changes the value in the dropdown. 

9 replies

harshitb6843
February 3, 2024

I think it is working as expected. Because this new row count should be applied from the current page. So from the User Experience standpoint, this looks right to me. Because let's say you had rows till 3700, then when you start from 3631, it will show you all the rows till 3700 but because you don't have more rows to display, it is not showing any. So this looks correct to me. 

You can also set the startIndex back to 1 if someone changes the value in the dropdown. 

prakhars0731
February 3, 2024

but when I am choosing 100 has drop down than I have 32 as total records in last page . So should I not accept that my start index should move from 3631 to 3600 ? this can be possible or not I have also doubt but I tried putting some calculation but it is not working.

harshitb6843
February 3, 2024

It is possible. But to me, it won't be a good UX. Still, if you want to do it, just mod the total count by 100 (or the value selected in the dropdown) and set the output as the start index. If the output is 0 then divide it by 100 and set the output as startIndex.