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 ( return (
<List style={{ height: "100%" }}> <List style={{ height: "100%" }}>
<AutoSizer> {(entriesList.length > 0) ? (
{({ height, width }) => ( <AutoSizer>
<VirtualizedList {({ height, width }) => (
width={width} <VirtualizedList
height={height} width={width}
rowCount={entriesList.length} height={height}
rowHeight={56} rowCount={entriesList.length}
rowRenderer={rowRenderer} rowHeight={56}
/> rowRenderer={rowRenderer}
)} />
</AutoSizer> )}
</AutoSizer>
) : (
<ListItem
primaryText="No entries found"
/>
)}
</List> </List>
); );
} }

Loading…
Cancel
Save