Skip to content

Commit 0e018d4

Browse files
authored
Merge pull request #10807 from WiXSL/fix-docs-markdown
[Doc] Fix anchors and code examples
2 parents 5d82f24 + 137a458 commit 0e018d4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

docs/DataTable.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const PostList = () => (
143143
```
144144
{% endraw %}
145145

146-
**Tip**: `<DataTable>` also lets you customize the table [header](#header) and [footer](#footer) components.
146+
**Tip**: `<DataTable>` also lets you customize the table [header](#head) and [footer](#foot) components.
147147

148148
## `bulkActionButtons`
149149

@@ -743,7 +743,7 @@ Using the `isRowExpandable` prop, you can customize which rows can have a collap
743743
For instance, this code shows an expand button only for rows that have a detail to show:
744744

745745
```tsx
746-
import { List, DataTable useRecordContext } from 'react-admin';
746+
import { List, DataTable, useRecordContext } from 'react-admin';
747747

748748
const PostPanel = () => {
749749
const record = useRecordContext();
@@ -1645,7 +1645,7 @@ An action column should not be sortable, so you don't need to specify a `source`
16451645

16461646
```tsx
16471647
<DataTable.Col>
1648-
<EditButton>
1648+
<EditButton />
16491649
<DeleteButton />
16501650
</DataTable.Col>
16511651
```
@@ -1681,9 +1681,9 @@ const ProductList = () => (
16811681
</CanAccess>
16821682
<CanAccess action="read" resource="products.reference">
16831683
<DataTable.Col source="reference" />
1684-
</DataTable.Col>
1684+
</CanAccess>
16851685
<CanAccess action="read" resource="products.category_id">
1686-
<DataTable.Col source="category_id" />
1686+
<DataTable.Col source="category_id">
16871687
<ReferenceField source="category_id" reference="categories" />
16881688
</DataTable.Col>
16891689
</CanAccess>
@@ -1715,9 +1715,9 @@ As this is quite verbose, you may prefer using the `<Datagrid>` component from t
17151715
- Users must have the `'read'` permission on a resource column to see it in the export:
17161716

17171717
```jsx
1718-
{ action: "read", resource: `${resource}.${source}` }.
1718+
{ action: "read", resource: `${resource}.${source}` }
17191719
// or
1720-
{ action: "read", resource: `${resource}.*` }.
1720+
{ action: "read", resource: `${resource}.*` }
17211721
```
17221722

17231723
- Users must have the `'delete'` permission on the resource to see the `<BulkExportButton>`.
@@ -1786,7 +1786,7 @@ const ProductList = () => (
17861786
**Tip**: Adding the 'read' permission for the resource itself doesn't grant the 'read' permission on the columns. If you want a user to see all possible columns, add the 'read' permission on columns using a wildcard:
17871787

17881788
```jsx
1789-
{ action: "read", resource: "products.*" }.
1789+
{ action: "read", resource: "products.*" }
17901790
```
17911791

17921792
## Typescript

docs/InPlaceEditor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ For example, to render a `<SelectField>` in read mode, you can use the following
158158

159159
The component to render in edit mode. By default, it's a `<TextInput>` using the `source` prop.
160160

161-
You can use any [input component](./Input.md) instead, as it renders in a `<Form>`. You will probably need to tweak the input variant, margin and style so that it matches the style of the read mode component.
161+
You can use any [input component](./Inputs.md) instead, as it renders in a `<Form>`. You will probably need to tweak the input variant, margin and style so that it matches the style of the read mode component.
162162

163163
<video controls autoplay playsinline muted loop>
164164
<source src="./img/InPlaceEditorField.mp4" type="video/mp4"/>
@@ -293,4 +293,4 @@ You can use the `sx` prop to apply styles to the read mode, edit mode and saving
293293

294294
- `& .RaInPlaceEditor-reading`: The read mode.
295295
- `& .RaInPlaceEditor-editing`: The editing mode.
296-
- `& .RaInPlaceEditor-saving`: The saving mode.
296+
- `& .RaInPlaceEditor-saving`: The saving mode.

0 commit comments

Comments
 (0)