Skip to content

Commit 4f4fb95

Browse files
authored
Merge pull request #10353 from marmelab/Fix/SimpleList_ErrorInFetch_story
Fix `SimpleList` `ErrorInFetch` story
2 parents d203612 + e22b7bd commit 4f4fb95

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

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

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -253,19 +253,21 @@ export const NoPrimaryText = () => (
253253

254254
export const ErrorInFetch = () => (
255255
<TestMemoryRouter>
256-
<ListContextProvider
257-
value={
258-
{
259-
error: new Error('Error in dataProvider'),
260-
} as any
261-
}
262-
>
263-
<SimpleList
264-
primaryText={record => record.title}
265-
secondaryText={record => record.author}
266-
tertiaryText={record => record.year}
267-
/>
268-
</ListContextProvider>
256+
<ResourceContextProvider value="books">
257+
<ListContextProvider
258+
value={
259+
{
260+
error: new Error('Error in dataProvider'),
261+
} as any
262+
}
263+
>
264+
<SimpleList
265+
primaryText={record => record.title}
266+
secondaryText={record => record.author}
267+
tertiaryText={record => record.year}
268+
/>
269+
</ListContextProvider>
270+
</ResourceContextProvider>
269271
</TestMemoryRouter>
270272
);
271273

0 commit comments

Comments
 (0)