File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
ra-core/src/controller/field
ra-ui-materialui/src/field Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1- import React , { ReactElement , ReactNode } from 'react' ;
1+ import React , { ReactNode } from 'react' ;
22import { ResourceContextProvider } from '../../core' ;
33import { ListContextProvider } from '../list/ListContextProvider' ;
44import {
@@ -136,7 +136,7 @@ export interface ReferenceManyFieldBaseProps<
136136 > {
137137 children : ReactNode ;
138138 empty ?: ReactNode ;
139- pagination ?: ReactElement ;
139+ pagination ?: ReactNode ;
140140}
141141
142142const defaultFilter = { } ;
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import {
1616 type RaRecord ,
1717 ReferenceFieldBase ,
1818 useReferenceFieldContext ,
19- useFieldValue ,
2019} from 'ra-core' ;
2120import type { UseQueryOptions } from '@tanstack/react-query' ;
2221import clsx from 'clsx' ;
You can’t perform that action at this time.
0 commit comments