Skip to content

Commit 52206d9

Browse files
committed
fix #1091
1 parent 8407634 commit 52206d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TableBody.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ class TableBody extends Component {
189189
}, this);
190190

191191
if (tableRows.length === 0 && !this.props.withoutNoDataText) {
192+
const colSpan = this.props.columns.filter(c => !c.hidden).length
193+
+ (isSelectRowDefined ? 1 : 0);
192194
tableRows = [
193195
<TableRow key='##table-empty##'>
194196
<td data-toggle='collapse'
195-
colSpan={ this.props.columns.length + (isSelectRowDefined ? 1 : 0) }
197+
colSpan={ colSpan }
196198
className='react-bs-table-no-data'>
197199
{ this.props.noDataText || Const.NO_DATA_TEXT }
198200
</td>

0 commit comments

Comments
 (0)