This commit is contained in:
Srinivas-Saravanan 2025-03-29 18:05:40 +05:30
parent e59d017719
commit 3543c3096c

View File

@ -1,4 +1,10 @@
<style>
.table-content.collapse:not(.show) {
display: block !important; /* Allows width calculation */
height: 0;
overflow: hidden;
}
#allTableContainer {
max-width: 100%;
overflow-x: auto;
@ -2070,22 +2076,45 @@
tableSNOTracker[tableID] = sno;
}
function increaseTableWidth(increaseBy) {
$('.table-collapsible-bar').each(function() {
let currentWidth = ($(this).width());
// // // console.log('table width ', typeof (currentWidth));
let increaseTableWidth = (currentWidth + increaseBy);
// // // console.log(increaseTableWidth);
$(this).width(currentWidth + increaseBy);
const $bar = $(this);
const wasCollapsed = $bar.hasClass('collapsed');
// Temporarily show the bar for accurate width calculation
if(wasCollapsed) {
$bar.css({
'display': 'block',
'visibility': 'hidden',
'position': 'absolute'
});
}
const currentWidth = $bar.width();
$bar.width(currentWidth + increaseBy);
// Restore original state
if(wasCollapsed) {
$bar.css({
'display': '',
'visibility': '',
'position': ''
});
}
});
// // // console.log("function called tablewidth increase");
$("table").each(function() {
let currentWidth = ($(this).width());
// // // console.log('table width ', typeof(currentWidth));
let increaseTableWidth = (currentWidth + increaseBy);
// // // console.log(increaseTableWidth);
$(this).width(currentWidth + increaseBy);
const $table = $(this);
const currentWidth = $table.width();
$table.width(currentWidth + increaseBy);
// Force layout update for hidden tables
$table.parent('.table-content').css('display', 'block');
$table.width(currentWidth + increaseBy);
$table.parent('.table-content').css('display', '');
});
}