Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Jul 1, 2024
1 parent 425a2da commit b59d1b7
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions src/lib/components/tablev2/TableCommon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,30 @@ export function TableRows<
/>
);
}

if (status === 'success' || status === undefined) {
if (typeof children === 'function') {
return children(
<VirtualizedRows
rows={rows}
listRef={bodyRef}
itemKey={itemKey}
rowHeight={rowHeight}
setHasScrollbar={setHasScrollbar}
onBottom={onBottom}
onBottomOffset={onBottomOffset}
RenderRow={RenderRow}
/>,
);
if (rows.length) {
return children(
<VirtualizedRows
rows={rows}
listRef={bodyRef}
itemKey={itemKey}
rowHeight={rowHeight}
setHasScrollbar={setHasScrollbar}
onBottom={onBottom}
onBottomOffset={onBottomOffset}
RenderRow={RenderRow}
/>,
);
} else {
return children(
<UnsuccessfulResult
rowHeight={rowHeight}
name={entityName}
status="noResult"
/>,
);
}
} else if (rows.length) {
return (
<VirtualizedRows
Expand All @@ -176,7 +185,13 @@ export function TableRows<
/>
);
} else {
return <UnsuccessfulResult name={entityName} status="noResult" />;
return (
<UnsuccessfulResult
rowHeight={rowHeight}
name={entityName}
status="noResult"
/>
);
}
}

Expand Down

0 comments on commit b59d1b7

Please sign in to comment.