Skip to content

Commit

Permalink
FIX Add one to current colspan in fixColumns instead of resetting to 2
Browse files Browse the repository at this point in the history
In the previous situation, the 'No items found' row would be hardcapped at colspan=2. This change ensures that that row always spans all columns in the table
  • Loading branch information
Kevinn1109 committed Dec 16, 2024
1 parent 0eb927c commit 8d14019
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion client/src/legacy/GridField.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import '../../../thirdparty/jquery-entwine/jquery.entwine.js';
$.entwine('ss', function($) {
$('.grid-field').entwine({
onmatch: function () {
// Adds an actions column for the search action if it does not exist already
if (this.needsColumnFix()) {
this.fixColumns();
this.injectSearchButton(false);
Expand Down Expand Up @@ -176,7 +177,8 @@ $.entwine('ss', function($) {
this.find('.sortable-header').append('<th class="main col-Actions" />');
this.find('tbody tr').each(function () {
var cell = $(this).find('td:last');
cell.attr('colspan', 2);
var colspan = cell.attr('colspan') ?? 1;
cell.attr('colspan', colspan + 1);
});
var $extraCell = $('<th class="extra" />');
$('.grid-field__filter-header th:last .action').each(function() {
Expand Down

0 comments on commit 8d14019

Please sign in to comment.