Skip to content

Commit

Permalink
Update dataTable.js
Browse files Browse the repository at this point in the history
make table size stable
  • Loading branch information
Peter committed Feb 9, 2022
1 parent 9b1e432 commit 1a72e1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/CoreHome/javascripts/dataTable.js
Expand Up @@ -566,6 +566,11 @@ $.extend(DataTable.prototype, UIControl.prototype, {

if (labelColumnWidth) {
$('td.label', domElem).each(function() {
var tableClass = $(this).closest('table').attr('class');
// check if the table is sub table. remove the width by 20px to make sure the table size wont change.
if (tableClass.includes('subDataTable')) {
labelColumnWidth = labelColumnWidth - 20;
}
$(this).width(removePaddingFromWidth($(this), labelColumnWidth));
});
}
Expand Down

0 comments on commit 1a72e1d

Please sign in to comment.