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: How can I dynamically add/update/delete rows to mdb.Datatable using JavaScript?

ThommyS free asked 3 years ago


Expected behavior Use in JavaScript something like: mdb.Datatable.add(row), mdb.Datatable.udpate(row) and mdb.Datatable.delete(row)

Actual behavior Does not exist (update method?)

Resources (screenshots, code snippets etc.)


Michał Duszak staff answered 3 years ago


Hello,

the Datatable component uses .update() method which allows you to rerender Datatable with new data.

Here's an example where I push new row to the data object, and then update the instance.https://mdbootstrap.com/snippets/standard/m-duszak/3188208#js-tab-view



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: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No
Tags