Topic: Changing default datatable pagination entries

yorkmyers priority asked 1 year ago

Can you please share how I can change the default number of rows that appear in a simple datatable?

I'm able to get the table to appear just by adding the CSS class. Couldn't find additional HTML-data attributes or JavaScript to use though.


Kamila Pieńkowska staff answered 1 year ago

You can change the default number of pagination with data attribute entries.


But if you want to use value different than 10, 25, 50 or 100 you also need to add a new option using the entriesOptions attribute. But since it accepts arrays as arguments it needs to be done with JS.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes