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: Popover / tooltip within datatabes

KelsoField priority asked 9 months ago


Expected behavior*_tooltips and popovers appear after init/render of datatables data_*Actual behavior*_Neither work_*Resources (screenshots, code snippets etc.)

The only referance to this has the solution as follows:

const popoversEl = document.querySelectorAll('[data-mdb-toggle="popover"]'); popoversEl.forEach((popoverEl) => { const popover = new mdb.Popover(popoverEl)

})

however, data-mdb-toggle="popover" is not the new way to initialise which is data-mdb-tooltip-init or data-mdb-popover-init.

How can initialise these after render * using datatables latest release not bundled version.


Kamila Pieńkowska staff answered 9 months ago


It is as it was before but data attribute changed. now ot will be:

const popoversEl = document.querySelectorAll('[data-mdb-popover-init]');
    popoversEl.forEach((popoverEl) => { const popover = new mdb.Popover(popoverEl)
})


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 7.1.0
  • Device: *all
  • Browser: *all
  • OS: *all
  • Provided sample code: No
  • Provided link: No