Topic: Async Datatable Action Buttons & Events

bpeterson priority asked 1 year ago


Hi, Could you help me figure out this action button question?

*Expected behavior*Async Datatable Action Buttons listen to 'render.mdb.datatable' and perform 'actions'

*Actual behavior*table will not update and breaks when i try to add the event listener

Resources (screenshots, code snippets etc.)

i have this commented out right now: asyncTable.addEventListener('render.mdb.datatable', setActions);


||||demo snippet here|||| if possible. can you include clickable rows too???



Mateusz Lazaru staff answered 1 year ago


Hi,

you should add event listener to the instance's element, not instance itself.

asyncTable._element.addEventListener('render.mdb.datatable', setActions);

https://mdbootstrap.com/snippets/standard/mlazaru/4564344


bpeterson priority commented 1 year ago

That's it; thanks! I appreciate the help



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

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