From 2abf4bc61b0f8309be7ed4919a83083efb52b03e Mon Sep 17 00:00:00 2001 From: zhixin Date: Mon, 11 Dec 2017 15:21:18 +0800 Subject: [PATCH] Fix #3472: add group header not the first th border left bug --- src/bootstrap-table.css | 2 +- src/bootstrap-table.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bootstrap-table.css b/src/bootstrap-table.css index ebf5e95a1a..512c0f9dee 100644 --- a/src/bootstrap-table.css +++ b/src/bootstrap-table.css @@ -72,7 +72,7 @@ outline: 0 solid transparent; } -.fixed-table-container thead th:first-child { +.fixed-table-container thead th:first-child:not([data-not-first-th]) { border-left: none; border-top-left-radius: 4px; -webkit-border-top-left-radius: 4px; diff --git a/src/bootstrap-table.js b/src/bootstrap-table.js index 77a51abff6..310dd15e58 100644 --- a/src/bootstrap-table.js +++ b/src/bootstrap-table.js @@ -843,6 +843,7 @@ sprintf(' rowspan="%s"', column.rowspan), sprintf(' colspan="%s"', column.colspan), sprintf(' data-field="%s"', column.field), + j === 0 && column.fieldIndex ? ' data-not-first-th' : '', '>'); html.push(sprintf('
', that.options.sortable && column.sortable ? @@ -2244,6 +2245,10 @@ index = i - 1; } + if (index === -1) { + return; + } + var $th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index])); if ($th.length > 1) { $th = $($ths[$this[0].cellIndex]);