DEV Community

Cover image for Show page no. in UI in Cursor pagination or infinite scroll
Sahil kashyap
Sahil kashyap

Posted on

Show page no. in UI in Cursor pagination or infinite scroll

On scroll page number are added
I wanted to show stripe subscriptions details to my admin.

Stripe uses cursor based pagination. So no page available.

Load more was nice but i wanted an "on scroll add a page number(scroll 1,scroll 2)"

So admin can check how many scroll happened,and easliy switch between scroll 1 and scroll 2 or more,

also filter via customer id and plan type(I used per unit and tiered plan)

Here's a codepen of how the UI looks: Link

Here's gist of how i used with stripe subscription pagination php laravel: Gist

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay