jericopulvera's avatar

How do I limit my pagination number buttons to 5?

How do I limit my pagination number buttons to 5? https://jsfiddle.net/z11fe07p/2005/

The pagination here is similar to what I want to accomplish. https://codepen.io/ratiw/pen/GmJayw

0 likes
4 replies
jlrdw's avatar

You could make a lengthaware paginator and then do the calculations so you only have at most five pages. So sorry on tablet I didn't see the discussion was for vue.

jericopulvera's avatar

@abusalameh thanks this is great.

the only problem is the div width changes, as much as possible I would like it to have a fixed size so It won't affect the responsiveness of the web page.

1 like
abusalameh's avatar
Level 30

if you're interested you can use this framework for vuejs it has a penalty of components with elegant design :) and this problem is solved anyway

https://vuetifyjs.com/

1 like

Please or to participate in this conversation.