Change history: show a placeholder when change history is empty.

master
Tom Hacohen 4 years ago
parent 7ba75ae3c1
commit 1a18ce11ce

@ -96,17 +96,23 @@ export default function GenericChangeHistory(props: PropsType) {
return (
<List style={{ height: "100%" }}>
<AutoSizer>
{({ height, width }) => (
<VirtualizedList
width={width}
height={height}
rowCount={entriesList.length}
rowHeight={56}
rowRenderer={rowRenderer}
/>
)}
</AutoSizer>
{(entriesList.length > 0) ? (
<AutoSizer>
{({ height, width }) => (
<VirtualizedList
width={width}
height={height}
rowCount={entriesList.length}
rowHeight={56}
rowRenderer={rowRenderer}
/>
)}
</AutoSizer>
) : (
<ListItem
primaryText="No entries found"
/>
)}
</List>
);
}

Loading…
Cancel
Save