diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index 39540400f..291f85dfd 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -150,6 +150,7 @@ class BootstrapTable extends React.Component { } render() { + var tableClass = classSet("react-bs-table"); var childrens = this.props.children; var style = { @@ -176,6 +177,7 @@ class BootstrapTable extends React.Component { var pagination = this.renderPagination(); var toolBar = this.renderToolBar(); var tableFilter = this.renderTableFilter(columns); + var isSelectAll = this.isSelectAll(); return (
{toolBar} @@ -189,7 +191,8 @@ class BootstrapTable extends React.Component { onSort={this.handleSort.bind(this)} onSelectAllRow={this.handleSelectAllRow.bind(this)} bordered={this.props.bordered} - condensed={this.props.condensed}> + condensed={this.props.condensed} + isSelectAll={isSelectAll}> {this.props.children} allRowKeys.indexOf(elm)>-1); + } + } + handleSort(order, sortField) { if (this.props.options.onSortChange) { this.props.options.onSortChange(sortField, order, this.props); diff --git a/src/TableHeader.js b/src/TableHeader.js index 89bcdb19e..1025d47df 100644 --- a/src/TableHeader.js +++ b/src/TableHeader.js @@ -63,7 +63,10 @@ class TableHeader extends React.Component{ if(this.props.rowSelectType == Const.ROW_SELECT_SINGLE) { return (); }else if(this.props.rowSelectType == Const.ROW_SELECT_MULTI){ - return (); + return ( + + + ); }else{ return null; } @@ -106,7 +109,8 @@ TableHeader.propTypes = { sortOrder: React.PropTypes.string, hideSelectColumn: React.PropTypes.bool, bordered: React.PropTypes.bool, - condensed: React.PropTypes.bool + condensed: React.PropTypes.bool, + isSelectAll: React.PropTypes.bool }; TableHeader.defaultProps = {