corretto uso di partials
This commit is contained in:
parent
2552b8ad8f
commit
fce8b9d4bb
|
|
@ -206,8 +206,19 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function reinitFlowbiteComponents(target) {
|
||||||
|
if (typeof window.initDropdowns === 'function') window.initDropdowns();
|
||||||
|
if (typeof window.initModals === 'function') {
|
||||||
|
if (!target || target.id === 'usersTableContainer') {
|
||||||
|
window.initModals();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
reinitFlowbiteComponents();
|
||||||
applyTranslations(document);
|
applyTranslations(document);
|
||||||
document.body.addEventListener('htmx:afterSwap', function (evt) {
|
document.body.addEventListener('htmx:afterSwap', function (evt) {
|
||||||
|
reinitFlowbiteComponents(evt.target || null);
|
||||||
applyTranslations(evt.target || document);
|
applyTranslations(evt.target || document);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue