Skip to content

Commit 9476d68

Browse files
committed
FIx documentation and JSDoc
1 parent 4f55868 commit 9476d68

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

docs_headless/src/content/docs/ArrayInputBase.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ This context provides a `getSource` function that returns the effective `source`
141141

142142
Here is an example where we leverage `getSource` and `setValue` to change the role of an user to 'admin' when the 'Make Admin' button is clicked:
143143

144-
{% raw %}
145-
146144
```tsx
147145
import { ArrayInputBase, useSourceContext } from 'ra-core';
148146
import { useFormContext } from 'react-hook-form';
@@ -176,6 +174,4 @@ const UserArray = () => (
176174
);
177175
```
178176

179-
{% endraw %}
180-
181177
**Tip:** If you only need the item's index, you can leverage the [`useSimpleFormIteratorItem` hook](./SimpleFormIterator.md#getting-the-element-index) instead.

docs_headless/src/content/docs/SimpleFormIteratorBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: default
33
title: "<SimpleFormIteratorBase>"
44
---
55

6-
`<SimpleFormIteratorBase>` helps building a component that lets users edit, add, remove and reorder sub-records. It is designed to be used as a child of [`<ArrayInputBase>`](./ArrayInputBase.md) or [`<ReferenceManyInput>`](https://react-admin-ee.marmelab.com/documentation/ra-core-ee#referencemanyinputbase). You can also use it within an `ArrayInputContext` containing a *field array*, i.e. the value returned by [react-hook-form's `useFieldArray` hook](https://react-hook-form.com/docs/usefieldarray).
6+
`<SimpleFormIteratorBase>` helps building a component that lets users edit, add, remove and reorder sub-records. It is designed to be used as a child of [`<ArrayInputBase>`](./ArrayInputBase.md) or [`<ReferenceManyInputBase>`](https://react-admin-ee.marmelab.com/documentation/ra-core-ee#referencemanyinputbase). You can also use it within an `ArrayInputContext` containing a *field array*, i.e. the value returned by [react-hook-form's `useFieldArray` hook](https://react-hook-form.com/docs/usefieldarray).
77

88
## Usage
99

packages/ra-core/src/controller/input/ArrayInputBase.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { ArrayInputContext } from './ArrayInputContext';
2020
*
2121
* @example
2222
*
23-
* import { ArrayInputBase } from 'react-admin';
23+
* import { ArrayInputBase } from 'ra-core';
2424
* import { SimpleFormIterator, DateInput, TextInput } from 'my-react-admin-ui';
2525
*
2626
* <ArrayInputBase source="backlinks">

0 commit comments

Comments
 (0)