Skip to content

Commit

Permalink
Fix wenzhixin#3472: add group header not the first th border left bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Dec 11, 2017
1 parent 3042b94 commit 2abf4bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('<div class="th-inner %s">', that.options.sortable && column.sortable ?
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 2abf4bc

Please sign in to comment.