Skip to content

Commit 8d6fd0e

Browse files
committed
Fix SimpleList does not propagate its resource prop
1 parent 6ac6fa4 commit 8d6fd0e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/ra-ui-materialui/src/list/SimpleList/SimpleList.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export const SimpleList = <RecordType extends RaRecord = any>(
8585
ref,
8686
rowSx,
8787
rowStyle,
88+
resource,
8889
...rest
8990
} = props;
9091
const { data, isPending, total } =
@@ -121,6 +122,7 @@ export const SimpleList = <RecordType extends RaRecord = any>(
121122
rowClick={rowClick}
122123
rowSx={rowSx}
123124
rowStyle={rowStyle}
125+
resource={resource}
124126
>
125127
<SimpleListItemContent
126128
leftAvatar={leftAvatar}

packages/ra-ui-materialui/src/list/SimpleList/SimpleListItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const SimpleListItem = <RecordType extends RaRecord = any>(
2828
typeof linkType === 'function' || typeof rowClick === 'function';
2929
const pathForRecord = useGetPathForRecord({
3030
link: isFunctionLink ? false : linkType ?? rowClick,
31+
resource,
3132
});
3233
const getPathForRecord = useGetPathForRecordCallback();
3334
const handleClick = useEvent(async () => {

0 commit comments

Comments
 (0)