Topic: Popover / tooltip within datatabes
KelsoField priority asked 7 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 7 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)
})
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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