Skip to content

Commit

Permalink
Fix <SimpleList linkType={false}> UI
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanMarmelab committed Nov 12, 2024
1 parent ae8fb4f commit 12552f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/ra-ui-materialui/src/list/SimpleList/SimpleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ const LinkOrNot = (
id,
children,
record,
sx,
...rest
} = props;
const createPath = useCreatePath();
Expand All @@ -286,6 +287,12 @@ const LinkOrNot = (
<ListItemText
// @ts-ignore
component="div"
sx={{
paddingX: 2,
paddingY: 1,
margin: 0,
...sx,
}}
{...rest}
>
{children}
Expand All @@ -297,6 +304,7 @@ const LinkOrNot = (
<ListItemButton
component={Link}
to={createPath({ resource, id, type })}
sx={{ ...sx }}
{...rest}
>
{children}
Expand Down

0 comments on commit 12552f3

Please sign in to comment.