Skip to content

Commit

Permalink
Merge pull request #9792 from marmelab/fix/simple-list-basic-story
Browse files Browse the repository at this point in the history
Fix `<SimpleList>` `<Basic>` story
  • Loading branch information
fzaninotto authored Apr 27, 2024
2 parents b59afe0 + eba4eb0 commit 5f33e00
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import * as React from 'react';
import fakeRestDataProvider from 'ra-data-fakerest';
import { Resource, ListContextProvider, TestMemoryRouter } from 'ra-core';
import {
Resource,
ListContextProvider,
TestMemoryRouter,
ResourceContextProvider,
} from 'ra-core';
import defaultMessages from 'ra-language-english';
import polyglotI18nProvider from 'ra-i18n-polyglot';

Expand Down Expand Up @@ -97,12 +102,14 @@ const data = {

export const Basic = () => (
<TestMemoryRouter>
<SimpleList
data={data.books}
primaryText={record => record.title}
secondaryText={record => record.author}
tertiaryText={record => record.year}
/>
<ResourceContextProvider value="books">
<SimpleList
data={data.books}
primaryText={record => record.title}
secondaryText={record => record.author}
tertiaryText={record => record.year}
/>
</ResourceContextProvider>
</TestMemoryRouter>
);

Expand Down

0 comments on commit 5f33e00

Please sign in to comment.