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
Copy file name to clipboardExpand all lines: docs/Permissions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ const MyToolbar = () => (
192
192
);
193
193
```
194
194
195
-
The **list components** (`<Datagrid>`), **show components** (`<SimpleShowLayout>`, `<TabbedShowLayout>`), and **edit components** (`<SimpleForm>`, `<Tabbedform>`) also support access control provided you use the version from the `@react-admin/ra-rbac` Enterprise package. Check the [RBAC documentation](./AuthRBAC.md#components) for more information.
195
+
The **list components** (`<DataTable>`, `<Datagrid>`), **show components** (`<SimpleShowLayout>`, `<TabbedShowLayout>`), and **edit components** (`<SimpleForm>`, `<Tabbedform>`) also support access control provided you use the version from the `@react-admin/ra-rbac` Enterprise package. Check the [RBAC documentation](./AuthRBAC.md#components) for more information.
@@ -116,7 +116,7 @@ Have a look at the Supabase [Replication Setup](https://supabase.com/docs/guides
116
116
The `ra-realtime` package contains a function augmenting a regular (API-based) `dataProvider` with real-time methods based on the capabilities of [API-Platform](https://api-platform.com/). Use it as follows:
You can change how the list of related records is rendered by passing a custom child reading the `ListContext` (e.g. a [`<Datagrid>`](./Datagrid.md)). See the [`children`](#children) section for details.
79
+
You can change how the list of related records is rendered by passing a custom child reading the `ListContext` (e.g. a [`<DataTable>`](./DataTable.md)). See the [`children`](#children) section for details.
76
80
77
81
## Props
78
82
@@ -117,28 +121,31 @@ Is equivalent to:
117
121
`<ReferenceArrayField>` creates a [`ListContext`](./useListContext.md), so you can use any child that uses a `ListContext`:
118
122
119
123
-[`<SingleFieldList>`](./SingleFieldList.md)
124
+
-[`<DataTable>`](./DataTable.md)
120
125
-[`<Datagrid>`](./Datagrid.md)
121
126
-[`<SimpleList>`](./SimpleList.md)
122
127
-[`<EditableDatagrid>`](./EditableDatagrid.md)
123
128
-[`<Calendar>`](./Calendar.md)
124
129
- Or a component of your own (check the [`<WithListContext>`](./WithListContext.md) and the [`useListContext`](./useListContext.md) chapters to learn how).
125
130
126
-
For instance, use a `<Datagrid>` to render the related records in a table:
131
+
For instance, use a `<DataTable>` to render the related records in a table:
@@ -190,7 +197,7 @@ For instance, to render only tags that are 'published', you can use the followin
190
197
191
198
## `label`
192
199
193
-
By default, `<SimpleShowLayout>`, `<Datagrid>` and other layout components infer the label of a field based on its `source`. For a `<ReferenceArrayField>`, this may not be what you expect:
200
+
By default, `<SimpleShowLayout>`, `<DataTable>` and other layout components infer the label of a field based on its `source`. For a `<ReferenceArrayField>`, this may not be what you expect:
194
201
195
202
```jsx
196
203
{/* default label is 'Tag Ids', or the translation of 'resources.posts.fields.tag_ids' if it exists */}
Copy file name to clipboardExpand all lines: docs/ReferenceField.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ Alternately, if you pass a child component, `<ReferenceField>` will render it in
65
65
66
66
This component fetches a referenced record (`users` in this example) using the `dataProvider.getMany()` method, and passes it to its child.
67
67
68
-
It uses `dataProvider.getMany()` instead of `dataProvider.getOne()`[for performance reasons](#performance). When using several `<ReferenceField>` in the same page (e.g. in a `<Datagrid>`), this allows to call the `dataProvider` once instead of once per row.
68
+
It uses `dataProvider.getMany()` instead of `dataProvider.getOne()`[for performance reasons](#performance). When using several `<ReferenceField>` in the same page (e.g. in a `<DataTable>`), this allows to call the `dataProvider` once instead of once per row.
69
69
70
70
## Props
71
71
@@ -78,7 +78,7 @@ It uses `dataProvider.getMany()` instead of `dataProvider.getOne()` [for perform
78
78
|`label`| Optional | `string | Function` |`resources. [resource]. fields.[source]`| Label to use for the field when rendered in layout components |
79
79
|`link`| Optional | `string | Function` |`edit`| Target of the link wrapping the rendered child. Set to `false` to disable the link. |
|`sortBy`| Optional | `string | Function` |`source`| Name of the field to use for sorting when used in a Datagrid|
81
+
|`sortBy`| Optional | `string | Function` |`source`| Name of the field to use for sorting when used in a DataTable|
82
82
83
83
`<ReferenceField>` also accepts the [common field props](./Fields.md#common-field-props).
84
84
@@ -172,7 +172,7 @@ For instance, if the `posts` resource has a `user_id` field, set the `reference`
172
172
173
173
## `sortBy`
174
174
175
-
By default, when used in a `<Datagrid>`, and when the user clicks on the column header of a `<ReferenceField>`, react-admin sorts the list by the field `source`. To specify another field name to sort by, set the `sortBy` prop.
175
+
By default, when used in a `<DataTable>`, and when the user clicks on the column header of a `<ReferenceField>`, react-admin sorts the list by the field `source`. To specify another field name to sort by, set the `sortBy` prop.
Copy file name to clipboardExpand all lines: docs/ReferenceManyCount.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ When you need to render the number of records related to another record via a on
11
11
12
12
## Usage
13
13
14
-
Use `<ReferenceManyCount>` as a regular Field in a `<Datagrid>` or `<SimpleShowLayout>` - or anywhere inside a [`RecordContext`](./useRecordContext.md). You must set the `reference` and `target` props to match the relationship:
14
+
Use `<ReferenceManyCount>` as a regular Field in a `<DataTable>` or `<SimpleShowLayout>` - or anywhere inside a [`RecordContext`](./useRecordContext.md). You must set the `reference` and `target` props to match the relationship:
15
15
16
16
-`reference` is the name of the related resource to fetch (e.g. `comments`)
17
17
-`target` is the name of the field in the related resource that points to the current resource (e.g. `post_id`)
@@ -20,40 +20,41 @@ For instance, to display the number of comments related to a post in a List view
0 commit comments