fix: skip rendering list when data is empty
This commit is contained in:
parent
cfb360ab4e
commit
044090a8f1
1 changed files with 18 additions and 16 deletions
|
|
@ -185,6 +185,7 @@ const DataTable = ({
|
|||
<TBody className={classes.body}>
|
||||
{loading && <H4>Loading...</H4>}
|
||||
{!loading && R.isEmpty(data) && <EmptyTable message={emptyText} />}
|
||||
{!R.isEmpty(data) && (
|
||||
<AutoSizer disableWidth>
|
||||
{({ height }) => (
|
||||
<List
|
||||
|
|
@ -201,6 +202,7 @@ const DataTable = ({
|
|||
/>
|
||||
)}
|
||||
</AutoSizer>
|
||||
)}
|
||||
</TBody>
|
||||
</Table>
|
||||
</Box>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue