Topic: Datatable rowClick.mdb.datatable event listener

lmcosta priority asked 2 years ago


How do I access underlying data in a datatable in rowClick.mdb.datatable event listner. The datatable is populated through a fectch to a remote mysql server.

Thank you


Dawid Wajszczuk staff answered 2 years ago


Hi,

Data is available under e.row. You can use something like this:

table.addEventListener('rowClick.mdb.datatable', (e) => {
  console.log(e.row)
}); 

Here is the snippet https://mdbootstrap.com/snippets/standard/d-wajszczuk/3815386#js-tab-view.

Keep coding,
Dawid


lmcosta priority commented 2 years ago

Thank you very much. Very helpful



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 3.11.0
  • Device: Desktop
  • Browser: Firefox
  • OS: Ubuntu 21.04
  • Provided sample code: No
  • Provided link: No