Pagination without ellipses

Pagination without ellipses

alamraghualamraghu Posts: 5Questions: 1Answers: 0
edited May 30 in Free community support

Hi Currently I am using database plugin //cdn.datatables.net/plug-ins/2.3.1/pagination/full_numbers_no_ellipses.js which i got from the url https://datatables.net/plug-ins/pagination/full_numbers_no_ellipses.
when i added the plugin in package .json and imported in to my typescript file the build ran successfully without errors
but the debug console output is showing
cannot read properties of undefined 'fn'.
But I am not getting the desired output which should be pagination numbers without ellipses

Any suggestions will be welcome

Answers

  • allanallan Posts: 64,546Questions: 1Answers: 10,669 Site admin

    Don't use that plugin - instead, use a spot of CSS to remove the ellipsis:

    div.dt-paging span.ellipsis {
      display: none;
    }
    

    The paging plugins haven't all been updated for the new features of DataTables 2, and many of them are actually redundant now. I need to make some times to tidy them up / remove old ones.

    Allan

  • alamraghualamraghu Posts: 5Questions: 1Answers: 0

    We can remove the ellipses but i need the output like these .Removing ellipses will not have desired output

  • allanallan Posts: 64,546Questions: 1Answers: 10,669 Site admin

    You mean show more buttons? Use paging.buttons. Or do you mean you want the strings "First", "Previous", etc? For that you would use language.paginate.first etc (see language.paginate).

    Allan

  • alamraghualamraghu Posts: 5Questions: 1Answers: 0

    I need first previous 1 2 3 4 5 6 7 next last

    I can create first previous next last with numbers along ellipses. if i hide ellipses then Output will show like below in case of 30 pagination numbers
    first previous 1 2 3 4 5 6 29 next last which i don't want.
    The output should show numbers in sequential order as shown in the above image

  • allanallan Posts: 64,546Questions: 1Answers: 10,669 Site admin

    Oh - you don't want the "29" in your example? I wasn't sure if you just have 7 pages, although I see from the info you probably have 18.

    Use paging.boundaryNumbers if you don't want the number after the ellipsis. There isn't currently an option to remove the ellipsis, but the CSS I gave can readily do that.

    Allan

  • alamraghualamraghu Posts: 5Questions: 1Answers: 0

    https://www.gyrocode.com/articles/jquery-datatables-pagination-without-ellipses/

    you can reference from the url what is the output i needed.

    Thanks

  • allanallan Posts: 64,546Questions: 1Answers: 10,669 Site admin

    https://live.datatables.net/fibahici/1/edit

    That uses the options and CSS that I mentioned above, which looks to me to produce the same result. Have I missed something?

    Allan

  • alamraghualamraghu Posts: 5Questions: 1Answers: 0

    Hi @allan
    thanks for your your help but there is one issue
    Output is working only for anonymous users but pagination is not at all showing for authenticated users .
    Is it something you have encountered ?

  • allanallan Posts: 64,546Questions: 1Answers: 10,669 Site admin

    Sounds like you have a different configuration for each state. DataTables knows nothing about your authentication process. I'd need a link to a page showing the issue to be able to say why it is happening on your page.

    Allan

Sign In or Register to comment.