Pagination - Display number of previous and next page

Pagination - Display number of previous and next page

CaptainNemoCaptainNemo Posts: 13Questions: 6Answers: 1

Hello,

When i use Datatables with large amount of data, i have many pages.
For example, i have 10 pages.
Initial state of pagination is : << 1 2 3 ... 10 >>

If i click 6 times on ">>" button, pagination become :
<< 1 .. 6 .. 10 >>

Is there a solution to display the previous and next page number ?
Like this : << 1 .. 5 6 7 .. 10 >>
And maybe with a settings, define how many number we want to display
For exemple, with a setting "4 numbers"

<< 1 .. 4 5 6 7 8 .. 10 >>

Thanks !

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    I'm seeing the behaviour you are looking for with the defaults - see here. There are alternative built-in pagination styles, see example here, and a few other plugins that you can choose from (or use as a template to create your own).

    Colin

This discussion has been closed.