Keyboard arrows for pagination

Keyboard arrows for pagination

FokakMenyFokakMeny Posts: 2Questions: 1Answers: 0

Hello there;
How can I use keyboard arrows to paginate between pages in my datatable?
For example, I have 14000 records in my database. When the data are loaded, I want to start pagination between pages using my keyboard arrows not just the next/previous buttons.
How can I achieve that?
Best Regards

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    Maybe this extension will do what you want:
    https://datatables.net/extensions/keytable/

    Kevin

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Answer ✓

    If KeyTable doesn't do what you want (it is cell based navigation) then you could bind an event listener to the arrow keys and simply call the page() method to skip between pages depending on the arrow key pressed.

    Allan

  • FokakMenyFokakMeny Posts: 2Questions: 1Answers: 0

    The page API was what I needed. Thank you very much <3

This discussion has been closed.