Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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.

Example: https://mdbootstrap.com/snippets/standard/yorkmyers/5139203


Kamila Pieńkowska staff answered 1 year ago


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

Example: https://mdbootstrap.com/snippets/standard/kpienkowska/5144756

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.

FREE CONSULTATION

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

Status

Answered

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