Skip to content

Commit

Permalink
fix #954
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jan 12, 2017
1 parent 9202f31 commit 8bedcf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ class BootstrapTable extends Component {
onRowMouseOut={ this.handleRowMouseOut }
onSelectRow={ this.handleSelectRow }
noDataText={ this.props.options.noDataText }
withoutNoDataText={ this.props.options.withoutNoDataText }
expanding={ this.state.expanding }
onExpand={ this.handleExpandRow }
beforeShowError={ this.props.options.beforeShowError } />
Expand Down Expand Up @@ -1137,6 +1138,7 @@ BootstrapTable.propTypes = {
onExportToCSV: React.PropTypes.func,
onCellEdit: React.PropTypes.func,
noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),
withoutNoDataText: React.PropTypes.bool,
handleConfirmDeleteRow: PropTypes.func,
prePage: PropTypes.string,
nextPage: PropTypes.string,
Expand Down Expand Up @@ -1241,6 +1243,7 @@ BootstrapTable.defaultProps = {
hideSizePerPage: false,
onSizePerPageList: undefined,
noDataText: undefined,
withoutNoDataText: false,
handleConfirmDeleteRow: undefined,
prePage: Const.PRE_PAGE,
nextPage: Const.NEXT_PAGE,
Expand Down
3 changes: 2 additions & 1 deletion src/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class TableBody extends Component {
}
return (result);
}, this);
if (tableRows.length === 0) {
if (tableRows.length === 0 && !this.props.withoutNoDataText) {
tableRows.push(
<TableRow key='##table-empty##'>
<td data-toggle='collapse'
Expand Down Expand Up @@ -306,6 +306,7 @@ TableBody.propTypes = {
onRowDoubleClick: PropTypes.func,
onSelectRow: PropTypes.func,
noDataText: PropTypes.oneOfType([ PropTypes.string, PropTypes.object ]),
withoutNoDataText: PropTypes.bool,
style: PropTypes.object,
tableBodyClass: PropTypes.string,
bodyContainerClass: PropTypes.string,
Expand Down

0 comments on commit 8bedcf7

Please sign in to comment.