Skip to content

Commit

Permalink
fix #465
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed May 23, 2016
1 parent 316c760 commit 866e07d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class BootstrapTable extends Component {
onMouseLeave={ this.handleMouseLeave }>
<TableHeader
ref='header'
tableHeaderClass={ this.props.tableHeaderClass }
style={ this.props.headerStyle }
rowSelectType={ this.props.selectRow.mode }
hideSelectColumn={ this.props.selectRow.hideSelectColumn }
Expand All @@ -265,6 +266,7 @@ class BootstrapTable extends Component {
{ this.props.children }
</TableHeader>
<TableBody ref='body'
tableBodyClass={ this.props.tableBodyClass }
style={ { ...style, ...this.props.bodyStyle } }
data={ this.state.data }
columns={ columns }
Expand Down Expand Up @@ -911,6 +913,8 @@ BootstrapTable.propTypes = {
containerStyle: PropTypes.object,
headerStyle: PropTypes.object,
bodyStyle: PropTypes.object,
tableHeaderClass: PropTypes.string,
tableBodyClass: PropTypes.string,
options: PropTypes.shape({
clearSearch: PropTypes.bool,
sortName: PropTypes.string,
Expand Down Expand Up @@ -993,6 +997,8 @@ BootstrapTable.defaultProps = {
containerStyle: undefined,
headerStyle: undefined,
bodyStyle: undefined,
tableHeaderClass: null,
tableBodyClass: null,
options: {
clearSearch: false,
sortName: undefined,
Expand Down
5 changes: 3 additions & 2 deletions src/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TableBody extends Component {
'table-bordered': this.props.bordered,
'table-hover': this.props.hover,
'table-condensed': this.props.condensed
});
}, this.props.tableBodyClass);

const isSelectRowDefined = this._isSelectRowDefined();
const tableHeader = this.renderTableHeader(isSelectRowDefined);
Expand Down Expand Up @@ -283,6 +283,7 @@ TableBody.propTypes = {
onRowClick: PropTypes.func,
onSelectRow: PropTypes.func,
noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),
style: PropTypes.object
style: PropTypes.object,
tableBodyClass: PropTypes.string
};
export default TableBody;
3 changes: 2 additions & 1 deletion src/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TableHeader extends Component {
const tableClasses = classSet('table', 'table-hover', {
'table-bordered': this.props.bordered,
'table-condensed': this.props.condensed
});
}, this.props.tableHeaderClass);
let selectRowHeaderCol = null;
if (!this.props.hideSelectColumn) selectRowHeaderCol = this.renderSelectRowHeader();
let i = 0;
Expand Down Expand Up @@ -69,6 +69,7 @@ class TableHeader extends Component {
}
}
TableHeader.propTypes = {
tableHeaderClass: PropTypes.string,
style: PropTypes.object,
rowSelectType: PropTypes.string,
onSort: PropTypes.func,
Expand Down

0 comments on commit 866e07d

Please sign in to comment.