Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7d4c5d8
remove `ListIterator.tsx` and `ListIterator.md`
erwanMarmelab Aug 4, 2025
924e02c
remove `ListIterator.spect.tsx` and `ListIterator.stories.tsx`
erwanMarmelab Aug 5, 2025
f44e156
remove ListIterator export
erwanMarmelab Aug 5, 2025
86c58a5
remove `ListIterator` usage of `SimpleList`
erwanMarmelab Aug 5, 2025
72b7c66
Adapt the SimpleList stories
erwanMarmelab Aug 5, 2025
6ce6d18
Adapt the ReferenceManyFieldBase story
erwanMarmelab Aug 5, 2025
4679cd2
adapt docs
erwanMarmelab Aug 5, 2025
ece9262
fix doc
erwanMarmelab Aug 5, 2025
2ad53cc
fix asynchrone issue in tests
erwanMarmelab Aug 5, 2025
42aaebc
Update packages/ra-ui-materialui/src/list/SimpleList/SimpleList.tsx
erwanMarmelab Aug 5, 2025
3ff8727
code review -> fix SimpleList standalone usage with the data prop
erwanMarmelab Aug 5, 2025
b970091
code review -> use ListBase render prop
erwanMarmelab Aug 5, 2025
7a9b7f1
Add a ListIterator alias for WithListcontext
erwanMarmelab Aug 5, 2025
fd1239b
Update WithListContext to accept optional empty, loading and error co…
erwanMarmelab Aug 5, 2025
e9f001e
fix BC
erwanMarmelab Aug 5, 2025
e578bc4
remove useless imports
erwanMarmelab Aug 5, 2025
ff99db0
use new props in the doc
erwanMarmelab Aug 5, 2025
60ee23d
add WithListContext tests
erwanMarmelab Aug 5, 2025
354d132
Document new WithListContext keys
erwanMarmelab Aug 5, 2025
b62a61d
Improve new key descriptions
erwanMarmelab Aug 5, 2025
a5de5ab
Change WithListContext for standalone usage, add RecordsIterator.
Madeorsk Aug 11, 2025
82e9ef9
Fix WithListContext props order.
Madeorsk Aug 11, 2025
e85db02
Document standalone usage of WithListContext and fix error element pr…
Madeorsk Aug 11, 2025
91a24b6
Improve ReferenceFieldBase doc.
Madeorsk Aug 11, 2025
22e16a0
Improve WithListContext query state components handling, handle offli…
Madeorsk Sep 5, 2025
8de677b
Improve SimpleList default empty component.
Madeorsk Sep 5, 2025
850da4a
Add a comment regarding standalone usage of SimpleList.
Madeorsk Sep 5, 2025
cb47038
Keep label as allowed WithListContext property.
Madeorsk Sep 5, 2025
f2c9bfc
Update ReferenceArrayFieldBase example with the updated WithListContext.
Madeorsk Sep 5, 2025
9aa28b5
Add support for children in WithListContext documentation.
Madeorsk Sep 5, 2025
4df55ed
Set render prop of WithListContext as optional.
Madeorsk Sep 5, 2025
ffa6eba
Improve stories and examples code.
Madeorsk Sep 5, 2025
aacef95
Update headless docs to remove ListIterator references.
Madeorsk Sep 8, 2025
95d2008
Keep a ListIterator export, even though RecordsIterator doesn't handl…
Madeorsk Sep 8, 2025
9fafcbd
Add RecordsIterator documentation.
Madeorsk Sep 11, 2025
1dbc38e
Replace loading by authLoading and add loading / error props to Creat…
Madeorsk Sep 15, 2025
3797ecc
Rename errorElement property to error, rename error property to error…
Madeorsk Sep 15, 2025
e887aec
Update docs for API changes and apply reviews.
Madeorsk Sep 15, 2025
bae5427
Add an example about ReferenceManyField in RecordsIterator documentat…
Madeorsk Sep 15, 2025
1238656
Update WithListContext usages.
Madeorsk Sep 15, 2025
a8aabbe
Fix imports in ReferenceArrayFieldBase documentation.
Madeorsk Sep 15, 2025
1400bbe
Remove loading property when using emptyWhileLoading.
Madeorsk Sep 15, 2025
4763556
Update ShowBase and EditBase authLoading property documentation.
Madeorsk Sep 15, 2025
e7d40a7
Document authLoading property of Create and CreateBase.
Madeorsk Sep 16, 2025
b2c2520
Document authLoading, loading, error, redirectOnError properties of E…
Madeorsk Sep 16, 2025
99c1262
Pass id when redirecting on error.
Madeorsk Sep 16, 2025
9569108
Document authLoading, loading, error, redirectOnError properties of S…
Madeorsk Sep 16, 2025
32d5a70
Document authLoading, loading, error properties of List, InfiniteList…
Madeorsk Sep 16, 2025
20e4020
Fix authLoading documentation.
Madeorsk Sep 18, 2025
e7859b4
Add RecordsIterator in navigation and reference.
Madeorsk Sep 18, 2025
5d39d9a
Fix ReferenceManyFieldBase referencing an invalid Iterator component.
Madeorsk Sep 18, 2025
8475336
Fix id tip in ShowBase.
Madeorsk Sep 18, 2025
8fdffa3
Apply review suggestions.
Madeorsk Sep 18, 2025
5312d69
Fix ReferenceFieldBase documentation.
Madeorsk Sep 18, 2025
d5727bc
Fix | in docs.
Madeorsk Sep 18, 2025
6ae2fc3
Keep actions displayed in offline / error case in EditView and ShowView.
Madeorsk Sep 18, 2025
a9703bd
Remove warning when using RecordIterator in a loading, error or empty…
Madeorsk Sep 18, 2025
f1f42cd
Improve RecordsIterator docs.
Madeorsk Sep 18, 2025
95369d4
Use loading prop instead of emptyWhileLoading.
Madeorsk Sep 18, 2025
7fedbca
Fix RecordsIterator documentation.
Madeorsk Sep 19, 2025
9dc920f
Remove query state props in some parts of the doc where it's not requ…
Madeorsk Sep 19, 2025
9da50cd
Revert story changes breaking inferred links.
Madeorsk Sep 19, 2025
a1809e8
Remove forgottent emptyWhileLoading and query state props.
Madeorsk Sep 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions docs/Create.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,24 @@ export default App;

You can customize the `<Create>` component using the following props:

| Prop | Required | Type | Default | Description |
|---------------------|----------|---------------------|----------------|--------------------------------------------------------------------------------------------------|
| `children` | Optional&nbsp;* | `ReactNode` | - | The components that render the form |
| `render` | Optional&nbsp;* | `function` | - | Alternative to children. Function that renders the form, receives the create context as argument |
| `actions` | Optional | `ReactNode` | Default toolbar| Override the actions toolbar with a custom component |
| `aside` | Optional | `ReactNode` | - | Component to render aside to the main content |
| `className` | Optional | `string` | - | Passed to the root component |
| `component` | Optional | `string`/`Component`| `Card` | Override the root component |
| `disableAuthentication` | Optional | `boolean` | `false` | Disable the authentication check |
| `mutationMode` | Optional | `string` | `pessimistic` | Switch to optimistic or undoable mutations |
| `mutationOptions` | Optional | `object` | - | Options for the `dataProvider.create()` call |
| `record` | Optional | `object` | `{}` | Initialize the form with a record |
| `redirect` | Optional | `string`/`function` | `'edit'` | Change the redirect location after successful creation |
| `resource` | Optional | `string` | From URL | Override the name of the resource to create |
| `sx` | Optional | `object` | - | Override the styles |
| `title` | Optional | `string`/`ReactNode`| Translation | Override the page title |
| `transform` | Optional | `function` | - | Transform the form data before calling `dataProvider.create()` |
| Prop | Required | Type | Default | Description |
|-------------------------|-----------------|----------------------|-----------------|--------------------------------------------------------------------------------------------------|
| `authLoading` | Optional | `ReactNode` | - | The component to display while checking for authentication |
| `children` | Optional&nbsp;* | `ReactNode` | - | The components that render the form |
| `render` | Optional&nbsp;* | `function` | - | Alternative to children. Function that renders the form, receives the create context as argument |
| `actions` | Optional | `ReactNode` | Default toolbar | Override the actions toolbar with a custom component |
| `aside` | Optional | `ReactNode` | - | Component to render aside to the main content |
| `className` | Optional | `string` | - | Passed to the root component |
| `component` | Optional | `string`/`Component` | `Card` | Override the root component |
| `disableAuthentication` | Optional | `boolean` | `false` | Disable the authentication check |
| `mutationMode` | Optional | `string` | `pessimistic` | Switch to optimistic or undoable mutations |
| `mutationOptions` | Optional | `object` | - | Options for the `dataProvider.create()` call |
| `record` | Optional | `object` | `{}` | Initialize the form with a record |
| `redirect` | Optional | `string`/`function` | `'edit'` | Change the redirect location after successful creation |
| `resource` | Optional | `string` | From URL | Override the name of the resource to create |
| `sx` | Optional | `object` | - | Override the styles |
| `title` | Optional | `string`/`ReactNode` | Translation | Override the page title |
| `transform` | Optional | `function` | - | Transform the form data before calling `dataProvider.create()` |

`*` You must provide either `children` or `render`.

Expand Down Expand Up @@ -125,6 +126,20 @@ const PostCreate = () => (

{% endraw %}

## `authLoading`

By default, `<Create>` renders the `<Loading>` component while checking for authentication and permissions. You can display a custom component via the `authLoading` prop:

```jsx
import { Create } from 'react-admin';

export const PostCreate = () => (
<Create authLoading={<p>Checking for permissions...</p>}>
...
</Create>
);
```

## `children`

The `<Create>` component will render its children inside a [`CreateContext`](./useCreateContext.md#return-value). Children can be any React node, but are usually a form component like [`<SimpleForm>`](./SimpleForm.md), [`<TabbedForm>`](./TabbedForm.md), or the headless [`<Form>`](./Form.md) component.
Expand Down
5 changes: 3 additions & 2 deletions docs/CreateBase.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ export const BookCreate = () => (

You can customize the `<CreateBase>` component using the following props, documented in the `<Create>` component:

* `children`: the components that renders the form
* `render`: alternative to children, a function that takes the `CreateController` context and renders the form
* [`authLoading`](./Create.md#authloading): the component to display while checking for authentication
* [`children`](./Create.md#children): the components that renders the form
* [`render`](./Create.md#render): alternative to children, a function that takes the `CreateController` context and renders the form
* [`disableAuthentication`](./Create.md#disableauthentication): disable the authentication check
* [`mutationMode`](./Create.md#mutationmode): Switch to optimistic or undoable mutations (pessimistic by default)
* [`mutationOptions`](./Create.md#mutationoptions): options for the `dataProvider.create()` call
Expand Down
30 changes: 15 additions & 15 deletions docs/DataTable.md
Original file line number Diff line number Diff line change
Expand Up @@ -970,21 +970,21 @@ export const PostList = () => (

### Props

| Prop | Required | Type | Default | Description |
| -------------------- | -------- | ----------------------- | --------------------- | ------------------------------------------------------------- |
| `align` | Optional | `"left" \| "right"` | `"left"` | The alignment of the column. |
| `children` | Optional | ReactNode | - | The content of the column. |
| `cellClassName` | Optional | string | - | The class name of the cells. |
| `cellSx` | Optional | function | - | A function that returns the sx prop to apply to a cell. |
| `className` | Optional | string | - | The class name of the column. |
| `disableSort` | Optional | boolean | false | Set to true to disable sort. |
| `field` | Optional | Component | - | The field component to use for the column. |
| `headerClassName` | Optional | string | - | The class name of the header cell. |
| `label` | Optional | string | - | The column label, displayed in the header. |
| `render` | Optional | (record) => ReactNode | - | A function to render the column content. |
| `sortByOrder` | Optional | "ASC" \| "DESC" | "ASC" | The order to use for sorting the column. |
| `source` | Optional | string | - | The source of the column, used for sorting and to read the data from the record when there is no child. |
| `sx` | Optional | SxProps | - | The styles to apply to the column. |
| Prop | Required | Type | Default | Description |
|-------------------|------------|---------------------------|------------|---------------------------------------------------------------------------------------------------------|
| `align` | Optional | `"left"` &#124; `"right"` | `"left"` | The alignment of the column. |
| `children` | Optional | ReactNode | - | The content of the column. |
| `cellClassName` | Optional | string | - | The class name of the cells. |
| `cellSx` | Optional | function | - | A function that returns the sx prop to apply to a cell. |
| `className` | Optional | string | - | The class name of the column. |
| `disableSort` | Optional | boolean | `false` | Set to true to disable sort. |
| `field` | Optional | Component | - | The field component to use for the column. |
| `headerClassName` | Optional | string | - | The class name of the header cell. |
| `label` | Optional | string | - | The column label, displayed in the header. |
| `render` | Optional | (record) => ReactNode | - | A function to render the column content. |
| `sortByOrder` | Optional | `"ASC"` &#124; `"DESC"` | `"ASC"` | The order to use for sorting the column. |
| `source` | Optional | string | - | The source of the column, used for sorting and to read the data from the record when there is no child. |
| `sx` | Optional | SxProps | - | The styles to apply to the column. |

Additional props are passed to [the MUI `<TableCell>`](https://mui.com/material-ui/api/table-cell/) component.

Expand Down
Loading