Skip to content
Merged
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions docs/ReferenceManyToManyInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,40 +210,40 @@ You can for instance use it to pass [a custom meta](./Actions.md#meta-parameter)

{% endraw %}

## `perPage`
You can also use it to pass an `onError` function as follows:

By default, react-admin displays at most 25 entries from the associative table (e.g. 25 `performances`). You can change the limit by setting the `perPage` prop:
{% raw %}

```tsx
<ReferenceManyToManyInput
reference="venues"
through="performances"
using="band_id,venue_id"
perPage={10}
mutationOptions={{
onError: (error, step, data) => console.warn({ error, step, data })
}}
>
{/* ... */}
</ReferenceManyToManyInput>
```

You can also use it to pass an `onError` function as follows:
{% endraw %}

{% raw %}
## `perPage`

By default, react-admin displays at most 25 entries from the associative table (e.g. 25 `performances`). You can change the limit by setting the `perPage` prop:

```tsx
<ReferenceManyToManyInput
reference="venues"
through="performances"
using="band_id,venue_id"
mutationOptions={{
onError: (error, step, data) => console.warn({ error, step, data })
}}
perPage={10}
>
{/* ... */}
</ReferenceManyToManyInput>
```

{% endraw %}

## `perPageChoices`

`<ReferenceManyToManyInput>` displays a list of possible values from the reference table (e.g. `venues`) as suggestions in the input. It uses the `getList()` dataProvider call to fetch these possible values.
Expand Down
Loading