Merge pull request #6010 from SDA-SE/feat/fix-react-warning-import

Fix a react warning in `<EntityListComponent>`
This commit is contained in:
Fredrik Adelöw
2021-06-15 15:39:32 +02:00
committed by GitHub
2 changed files with 12 additions and 3 deletions
@@ -146,11 +146,15 @@ export const EntityListComponent = ({
<List component="div" disablePadding dense>
{sortEntities(r.entities).map(entity => (
<ListItem
component={withLinks ? EntityRefLink : 'div'}
entityRef={withLinks ? entity : undefined}
button={withLinks as any}
key={formatEntityRefTitle(entity)}
className={classes.nested}
{...(withLinks
? {
component: EntityRefLink,
entityRef: entity,
button: withLinks as any,
}
: {})}
>
<ListItemIcon>{getEntityIcon(entity)}</ListItemIcon>
<ListItemText primary={formatEntityRefTitle(entity)} />