fix table column sizing issue

This commit is contained in:
2026-06-21 12:32:26 +02:00
parent 6682b974a3
commit ebf44f5152

View File

@@ -15,12 +15,31 @@ document.addEventListener("DOMContentLoaded", function () {
cardBody.querySelectorAll('.tab-pane').forEach(content => content.classList.remove('show', 'active'));
selectedTab.classList.add('active');
selectedContent.classList.add('show', 'active');
// Give the browser a moment to render the tab
setTimeout(() => {
$.fn.dataTable.tables({
visible: true,
api: true
})
.columns.adjust()
.draw();
}, 0);
}
cardBody.querySelectorAll('.nav-link').forEach(tab => {
tab.addEventListener("click", function () {
let targetTab = this.getAttribute("href");
history.replaceState(null, null, targetTab);
setTimeout(() => {
$.fn.dataTable.tables({
visible: true,
api: true
})
.columns.adjust()
.draw();
}, 0);
});
});