Skip to content

Commit 028b112

Browse files
committed
code review applied
1 parent 7838131 commit 028b112

File tree

5 files changed

+3
-12
lines changed

5 files changed

+3
-12
lines changed

docs/ShowBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const App = () => (
6363
| Prop | Required | Type | Default | Description
6464
|------------------|----------|-------------------|---------|--------------------------------------------------------
6565
| `children` | Optional | `ReactNode` | | The components rendering the record fields
66-
| `children` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
66+
| `render` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
6767
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
6868
| `empty WhileLoading` | Optional | `boolean` | | Set to `true` to return `null` while the list is loading
6969
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL

packages/ra-core/src/controller/create/CreateBase.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export const AccessControl = ({
151151
export const WithRenderProp = ({
152152
dataProvider = defaultDataProvider,
153153
callTimeOptions,
154-
...props
155154
}: {
156155
dataProvider?: DataProvider;
157156
callTimeOptions?: SaveHandlerCallbacks;

packages/ra-core/src/controller/list/ListBase.stories.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,11 @@ export const WithRenderProps = ({
296296
data,
297297
error,
298298
isPending,
299-
sort,
300-
filterValues,
301299
page,
302300
perPage,
303301
setPage,
304302
total,
305303
} = controllerProps;
306-
const defaultValue = JSON.stringify({
307-
page,
308-
perPage,
309-
sort,
310-
filterValues,
311-
});
312304
if (isPending) {
313305
return <div>Loading...</div>;
314306
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const List = <RecordType extends RaRecord = any>(
9999
};
100100

101101
export interface ListProps<RecordType extends RaRecord = any>
102-
extends ListBaseProps<RecordType>,
102+
extends Omit<ListBaseProps<RecordType>, 'children'>,
103103
ListViewProps {}
104104

105105
const defaultFilter = {};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export interface ListViewProps {
191191
* </List>
192192
* );
193193
*/
194-
children?: ReactNode;
194+
children: ReactNode;
195195

196196
/**
197197
* The component used to display the list. Defaults to <Card>.

0 commit comments

Comments
 (0)