18661: Fixes the '<div> cannot appear as a child of <tbody>' error.
[arvados-workbench2.git] / src / components / data-table / data-table.tsx
index 2119e53d7df603a91de2da7dfa4f9772403963e4..e8a6ce69aad0cd923f4e3c77d2385e5bb107f526 100644 (file)
@@ -96,16 +96,15 @@ export const DataTable = withStyles(styles)(
                             </TableRow>
                         </TableHead>
                         <TableBody className={classes.tableBody}>
-                            {
-                                this.props.working ?
-                                <div className={classes.loader}>
-                                    <DataTableDefaultView
-                                        icon={PendingIcon}
-                                        messages={['Loading data, please wait.']} />
-                                </div> : items.map(this.renderBodyRow)
-                            }
+                            { this.props.working !== undefined && !this.props.working && items.map(this.renderBodyRow) }
                         </TableBody>
                     </Table>
+                    { this.props.working &&
+                        <div className={classes.loader}>
+                            <DataTableDefaultView
+                                icon={PendingIcon}
+                                messages={['Loading data, please wait.']} />
+                        </div> }
                     {items.length === 0 && this.props.working !== undefined && !this.props.working && this.renderNoItemsPlaceholder()}
                 </div>
             </div>;