Update to use React.Fragment spread with row props (#1781)

This commit is contained in:
Chris Norwood
2019-12-13 18:08:01 -07:00
committed by Tanner Linsley
parent 506a22062e
commit 632ea28c4b
+3 -3
View File
@@ -74,8 +74,8 @@ function Table({ columns: userColumns, data, renderRowSubComponent }) {
prepareRow(row)
return (
// Use a React.Fragment here so the table markup is still valid
<>
<tr {...row.getRowProps()}>
<React.Fragment {...row.getRowProps()}>
<tr>
{row.cells.map(cell => {
return (
<td {...cell.getCellProps()}>{cell.render('Cell')}</td>
@@ -100,7 +100,7 @@ function Table({ columns: userColumns, data, renderRowSubComponent }) {
</td>
</tr>
) : null}
</>
</React.Fragment>
)
})}
</tbody>