Skip to content

Commit b2121fd

Browse files
committed
fix #1099 #1101
1 parent 4aaf140 commit b2121fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react-bootstrap-table2/src/header-cell.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ class HeaderCell extends eventDelegater(React.Component) {
4343

4444
const delegateEvents = this.delegate(headerEvents);
4545

46+
const customAttrs = _.isFunction(headerAttrs)
47+
? headerAttrs(column, index)
48+
: (headerAttrs || {});
49+
4650
const cellAttrs = {
47-
..._.isFunction(headerAttrs) ? headerAttrs(column, index) : headerAttrs,
51+
...customAttrs,
4852
...delegateEvents,
49-
tabIndex: 0
53+
tabIndex: _.isDefined(customAttrs.tabIndex) ? customAttrs.tabIndex : 0
5054
};
5155

5256
let sortSymbol;

0 commit comments

Comments
 (0)