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