diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index ed39b4de2..2b93c5b7f 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -1,6 +1,7 @@ /* eslint no-alert: 0 */ /* eslint max-len: 0 */ import React, { Component, PropTypes } from 'react'; +import classSet from 'classnames'; import Const from './Const'; import TableHeader from './TableHeader'; import TableBody from './TableBody'; @@ -258,13 +259,17 @@ class BootstrapTable extends Component { let sortIndicator = this.props.options.sortIndicator; if (typeof this.props.options.sortIndicator === 'undefined') sortIndicator = true; return ( -
+
{ toolBar } -
+
{ tableHeader } @@ -290,6 +292,7 @@ TableBody.propTypes = { onSelectRow: PropTypes.func, noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]), style: PropTypes.object, - tableBodyClass: PropTypes.string + tableBodyClass: PropTypes.string, + bodyContainerClass: PropTypes.string }; export default TableBody; diff --git a/src/TableHeader.js b/src/TableHeader.js index 053376c74..434ade1fc 100644 --- a/src/TableHeader.js +++ b/src/TableHeader.js @@ -23,7 +23,10 @@ class Checkbox extends Component { class TableHeader extends Component { render() { - const containerClasses = classSet('react-bs-container-header', 'table-header-wrapper'); + const containerClasses = classSet( + 'react-bs-container-header', + 'table-header-wrapper', + this.props.headerContainerClass); const tableClasses = classSet('table', 'table-hover', { 'table-bordered': this.props.bordered, 'table-condensed': this.props.condensed @@ -78,6 +81,7 @@ class TableHeader extends Component { } } TableHeader.propTypes = { + headerContainerClass: PropTypes.string, tableHeaderClass: PropTypes.string, style: PropTypes.object, rowSelectType: PropTypes.string,