Topic: Datatable rowClick.mdb.datatable event listener

lmcosta premium asked 8 months 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 8 months 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 premium commented 8 months 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

  • User: Premium
  • 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