fix: register pre-existing bs tooltips
This commit is contained in:
parent
4cc9efce42
commit
e3702878cd
@ -81,6 +81,10 @@ class UI {
|
|||||||
*/
|
*/
|
||||||
public static addBootstrapTooltips(element?: Element) {
|
public static addBootstrapTooltips(element?: Element) {
|
||||||
element = element || document.body;
|
element = element || document.body;
|
||||||
|
|
||||||
|
const list = element.querySelectorAll('[data-bs-toggle="tooltip"]');
|
||||||
|
list.forEach((el: Element) => new bootstrap.Tooltip(el));
|
||||||
|
|
||||||
element.querySelectorAll("[title]").forEach((el) => {
|
element.querySelectorAll("[title]").forEach((el) => {
|
||||||
el.setAttribute("data-bs-toggle", "tooltip");
|
el.setAttribute("data-bs-toggle", "tooltip");
|
||||||
el.setAttribute("data-bs-placement", "bottom");
|
el.setAttribute("data-bs-placement", "bottom");
|
||||||
|
Loading…
Reference in New Issue
Block a user