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
Discussion posts and replies are publicly visible
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.
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.
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.
I tried like this but didn't work can you check this is it the same logic as above or I missed something
if( mod(ri!totalCount, ri!pagingInfo.batchSize) = 0, ri!totalCount - (ri!pagingInfo.batchSize) + 1, ( floor(ri!totalCount / ri!pagingInfo.batchSize) * ri!pagingInfo.batchSize ) + 1 ),
See that is the problem. You need to show 100 records from where the person is already, which is the start index. So if you move back the start index, they will start seeing the records they have already seen. Getting it?
But according to my current use case they are fine with it as a user