Skip to content

Commit c6f73a9

Browse files
committed
Apply review
1 parent 7292f76 commit c6f73a9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

docs/ReferenceManyField.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This example leverages [`<SingleFieldList>`](./SingleFieldList.md) to display an
9090
| -------------- | -------- | --------------------------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------- |
9191
| `children` | Required | `Element` | - | One or several elements that render a list of records based on a `ListContext` |
9292
| `debounce` | Optional | `number` | 500 | debounce time in ms for the `setFilters` callbacks |
93-
| `empty` | Optional | `Element` | - | Element to display when there are no related records. |
93+
| `empty` | Optional | `ReactNode` | - | Element to display when there are no related records. |
9494
| `filter` | Optional | `Object` | - | Filters to use when fetching the related records, passed to `getManyReference()` |
9595
| `pagination` | Optional | `Element` | - | Pagination element to display pagination controls. empty by default (no pagination) |
9696
| `perPage` | Optional | `number` | 25 | Maximum number of referenced records to fetch |
@@ -203,7 +203,7 @@ Use `empty` to customize the text displayed when the related record is empty.
203203
</ReferenceManyField>
204204
```
205205

206-
`empty` also accepts a `ReactElement`.
206+
`empty` also accepts a `ReactNode`.
207207

208208
```jsx
209209
<ReferenceManyField

docs/ReferenceOneField.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Use `empty` to customize the text displayed when the related record is empty.
9797
</ReferenceOneField>
9898
```
9999

100-
`empty` also accepts a `ReactElement`.
100+
`empty` also accepts a `ReactNode`.
101101

102102
```jsx
103103
<ReferenceOneField

packages/ra-core/src/controller/field/ReferenceManyFieldBase.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ReactElement, ReactNode } from 'react';
1+
import React, { ReactNode } from 'react';
22
import { ResourceContextProvider } from '../../core';
33
import { ListContextProvider } from '../list/ListContextProvider';
44
import {
@@ -136,7 +136,7 @@ export interface ReferenceManyFieldBaseProps<
136136
> {
137137
children: ReactNode;
138138
empty?: ReactNode;
139-
pagination?: ReactElement;
139+
pagination?: ReactNode;
140140
}
141141

142142
const defaultFilter = {};

packages/ra-ui-materialui/src/field/ReferenceField.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
type RaRecord,
1717
ReferenceFieldBase,
1818
useReferenceFieldContext,
19-
useFieldValue,
2019
} from 'ra-core';
2120
import type { UseQueryOptions } from '@tanstack/react-query';
2221
import clsx from 'clsx';

0 commit comments

Comments
 (0)