Skip to content

Commit 48b8e84

Browse files
committed
2 parents ad1d7bb + 70de237 commit 48b8e84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/TableBody.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,19 @@ class TableBody extends Component {
187187
}
188188
return (result);
189189
}, this);
190+
191+
let tableRowsOutput = tableRows;
192+
190193
if (tableRows.length === 0 && !this.props.withoutNoDataText) {
191-
tableRows.push(
194+
tableRowsOutput = [
192195
<TableRow key='##table-empty##'>
193196
<td data-toggle='collapse'
194197
colSpan={ this.props.columns.length + (isSelectRowDefined ? 1 : 0) }
195198
className='react-bs-table-no-data'>
196199
{ this.props.noDataText || Const.NO_DATA_TEXT }
197200
</td>
198201
</TableRow>
199-
);
202+
];
200203
}
201204

202205
return (
@@ -206,7 +209,7 @@ class TableBody extends Component {
206209
<table className={ tableClasses }>
207210
{ React.cloneElement(tableHeader, { ref: 'header' }) }
208211
<tbody ref='tbody'>
209-
{ tableRows }
212+
{ tableRowsOutput }
210213
</tbody>
211214
</table>
212215
</div>

0 commit comments

Comments
 (0)