mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-11 20:40:17 +00:00
Update to use React.Fragment spread with row props (#1781)
This commit is contained in:
committed by
Tanner Linsley
parent
506a22062e
commit
632ea28c4b
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user