You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `children` | Optional | `ReactNode` | | The components rendering the record fields
50
-
| `render` | Optional | `(props: EditControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the EditController context and renders the form
51
-
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
52
-
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
53
-
| `loading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
| `authLoading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
50
+
| `children` | Optional | `ReactNode` | | The components rendering the record fields
51
+
| `render` | Optional | `(props: EditControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the EditController context and renders the form
52
+
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
53
+
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
| `mutationOptions` | Optional | `ReactNode` | | The options to pass to the `useUpdate` hook
56
+
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
57
+
| `queryOptions` | Optional | `object` | | The options to pass to the `useGetOne` hook
58
+
| `transform` | Optional | `string` | | Transform the form data before calling `dataProvider.update()`
59
+
60
+
## `authLoading`
61
+
62
+
By default, `<EditBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `authLoading` prop:
59
63
64
+
```jsx
65
+
import { EditBase } from'react-admin';
66
+
67
+
exportconstPostEdit= () => (
68
+
<EditBase authLoading={<p>Checking for permissions...</p>}>
**Tip**: Pass both a custom `id` and a custom `resource` prop to use `<EditBase>` independently of the current URL. This even allows you to use more than one `<EditBase>` component in the same page.
126
139
127
-
## `loading`
128
-
129
-
By default, `<EditBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `loading` prop:
130
-
131
-
```jsx
132
-
import { EditBase } from'react-admin';
133
-
134
-
exportconstPostEdit= () => (
135
-
<EditBase loading={<p>Checking for permissions...</p>}>
136
-
...
137
-
</EditBase>
138
-
);
139
-
```
140
-
141
140
## `mutationMode`
142
141
143
142
The `<EditBase>` component exposes a save method, which perform a "mutation" (i.e. they alter the data). React-admin offers three modes for mutations. The mode determines when the side effects (redirection, notifications, etc.) are executed:
| `children` | Optional | `ReactNode` | | The components rendering the record fields
66
-
| `render` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
67
-
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
68
-
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
69
-
| `loading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
70
-
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
71
-
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook
72
-
| `resource` | Optional | `string` | | The resource name, e.g. `posts`
| `authLoading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
66
+
| `children` | Optional | `ReactNode` | | The components rendering the record fields
67
+
| `render` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
68
+
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
69
+
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
70
+
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
71
+
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook
72
+
| `resource` | Optional | `string` | | The resource name, e.g. `posts`
73
+
74
+
## `authLoading`
75
+
76
+
By default, `<ShowBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `authLoading` prop:
77
+
78
+
```jsx
79
+
import { ShowBase } from'react-admin';
80
+
81
+
exportconstPostShow= () => (
82
+
<ShowBase authLoading={<p>Checking for permissions...</p>}>
**Tip**: Pass both a custom `id` and a custom `resource` prop to use `<ShowBase>` independently of the current URL. This even allows you to use more than one `<ShowBase>` component in the same page.
140
154
141
-
## `loading`
142
-
143
-
By default, `<ShowBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `loading` prop:
144
-
145
-
```jsx
146
-
import { ShowBase } from'react-admin';
147
-
148
-
exportconstPostShow= () => (
149
-
<ShowBase loading={<p>Checking for permissions...</p>}>
150
-
...
151
-
</ShowBase>
152
-
);
153
-
```
154
-
155
155
## `offline`
156
156
157
157
By default, `<ShowBase>` renders nothing when there is no connectivity and the record hasn't been cached yet. You can provide your own component via the `offline` prop:
| `children` | Optional | `ReactNode` | | The components rendering the record fields
44
-
| `render` | Optional | `(props: EditControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the EditController context and renders the form
45
-
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
46
-
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
47
-
| `loading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
| `authLoading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
44
+
| `children` | Optional | `ReactNode` | | The components rendering the record fields
45
+
| `render` | Optional | `(props: EditControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the EditController context and renders the form
46
+
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
47
+
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
| `mutationOptions` | Optional | `ReactNode` | | The options to pass to the `useUpdate` hook
50
+
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
51
+
| `queryOptions` | Optional | `object` | | The options to pass to the `useGetOne` hook
52
+
| `transform` | Optional | `string` | | Transform the form data before calling `dataProvider.update()`
53
+
54
+
## `authLoading`
55
+
56
+
By default, `<EditBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `authLoading` prop:
53
57
58
+
```jsx
59
+
import { EditBase, Form } from'ra-core';
60
+
61
+
exportconstPostEdit= () => (
62
+
<EditBase authLoading={<p>Checking for permissions...</p>}>
**Tip**: Pass both a custom `id` and a custom `resource` prop to use `<EditBase>` independently of the current URL. This even allows you to use more than one `<EditBase>` component in the same page.
119
134
120
-
## `loading`
121
-
122
-
By default, `<EditBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `loading` prop:
123
-
124
-
```jsx
125
-
import { EditBase, Form } from'ra-core';
126
-
127
-
exportconstPostEdit= () => (
128
-
<EditBase loading={<p>Checking for permissions...</p>}>
129
-
<Form>
130
-
{/* form content */}
131
-
</Form>
132
-
</EditBase>
133
-
);
134
-
```
135
-
136
135
## `mutationMode`
137
136
138
137
The `<EditBase>` component exposes a save method, which perform a "mutation" (i.e. they alter the data). Ra-core offers three modes for mutations. The mode determines when the side effects (redirection, notifications, etc.) are executed:
| `children` | Optional | `ReactNode` | | The components rendering the record fields
62
-
| `render` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
63
-
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
64
-
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
65
-
| `loading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
66
-
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
67
-
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook
68
-
| `resource` | Optional | `string` | | The resource name, e.g. `posts`
| `authLoading` | Optional | `ReactNode` | | The component to render while checking for authentication and permissions
62
+
| `children` | Optional | `ReactNode` | | The components rendering the record fields
63
+
| `render` | Optional | `(props: ShowControllerResult<RecordType>) => ReactNode` | | Alternative to children, a function that takes the ShowController context and renders the form
64
+
| `disable Authentication` | Optional | `boolean` | | Set to `true` to disable the authentication check
65
+
| `id` | Optional | `string` | | The record identifier. If not provided, it will be deduced from the URL
66
+
| `offline` | Optional | `ReactNode` | | The component to render when there is no connectivity and the record isn't in the cache
67
+
| `queryOptions` | Optional | `object` | | The options to pass to the `useQuery` hook
68
+
| `resource` | Optional | `string` | | The resource name, e.g. `posts`
69
+
70
+
## `authLoading`
71
+
72
+
By default, `<ShowBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `authLoading` prop:
73
+
74
+
```jsx
75
+
import { ShowBase } from'ra-core';
76
+
77
+
exportconstPostShow= () => (
78
+
<ShowBase authLoading={<p>Checking for permissions...</p>}>
**Tip**: Pass both a custom `id` and a custom `resource` prop to use `<ShowBase>` independently of the current URL. This even allows you to use more than one `<ShowBase>` component in the same page.
140
154
141
-
## `loading`
142
-
143
-
By default, `<ShowBase>` renders nothing while checking for authentication and permissions. You can provide your own component via the `loading` prop:
144
-
145
-
```jsx
146
-
import { ShowBase } from'ra-core';
147
-
148
-
exportconstPostShow= () => (
149
-
<ShowBase loading={<p>Checking for permissions...</p>}>
150
-
...
151
-
</ShowBase>
152
-
);
153
-
```
154
-
155
155
## `offline`
156
156
157
157
By default, `<ShowBase>` renders nothing when there is no connectivity and the record hasn't been cached yet. You can provide your own component via the `offline` prop:
0 commit comments