Skip to content

Commit 0085601

Browse files
committed
update for #1082
1 parent 48b8e84 commit 0085601

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/TableBody.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class TableBody extends Component {
5252
expandColSpan += 1;
5353
}
5454

55-
const tableRows = this.props.data.map(function(data, r) {
55+
let tableRows = this.props.data.map(function(data, r) {
5656
const tableColumns = this.props.columns.map(function(column, i) {
5757
const fieldValue = data[column.name];
5858
const isFocusCell = r === y && i === x;
@@ -188,10 +188,8 @@ class TableBody extends Component {
188188
return (result);
189189
}, this);
190190

191-
let tableRowsOutput = tableRows;
192-
193191
if (tableRows.length === 0 && !this.props.withoutNoDataText) {
194-
tableRowsOutput = [
192+
tableRows = [
195193
<TableRow key='##table-empty##'>
196194
<td data-toggle='collapse'
197195
colSpan={ this.props.columns.length + (isSelectRowDefined ? 1 : 0) }
@@ -209,7 +207,7 @@ class TableBody extends Component {
209207
<table className={ tableClasses }>
210208
{ React.cloneElement(tableHeader, { ref: 'header' }) }
211209
<tbody ref='tbody'>
212-
{ tableRowsOutput }
210+
{ tableRows }
213211
</tbody>
214212
</table>
215213
</div>

0 commit comments

Comments
 (0)