Skip to content

Commit

Permalink
Revert changes on ReferenceManyToManyField.md
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanMarmelab authored Jan 23, 2025
1 parent aff7f74 commit 88fe712
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions docs/ReferenceManyToManyField.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const BandShow = () => (
);
```

## `filter`: Permanent Filter
## `filter`

You can filter the records of the associative table (e.g. `performances`) using the `filter` prop. This `filter` is passed to the `getManyReference()` call.

Expand All @@ -120,36 +120,6 @@ You can filter the records of the associative table (e.g. `performances`) using

{% endraw %}

## Filter Inputs

<video controls autoplay playsinline muted loop>
<source src="https://react-admin-ee.marmelab.com/assets/ra-form-layout/latest/ReferenceManyToManyFieldFilterInput.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

You can add an array of filter Inputs to the `ReferenceManyToManyField` using [the `FilterForm` component](./FilterForm.md):

{% raw %}

```tsx
<ReferenceManyToManyField
reference="venues"
through="performances"
using="band_id,venue_id"
>
<FilterForm
filters={[<TextInput source="q" label="Search" alwaysOn />]}
/>
<Datagrid>
{/* ... */}
</Datagrid>
</ReferenceManyToManyField>
```

{% endraw %}

**Tip:** `ReferenceManyToManyField` doesn't provide any `FilterButton`, so you need to add the `alwaysOn` prop to your filter inputs.

## `joinLimit`

By default, react-admin fetches 100 entries in the join table (e.g. `performances`). You can decrease or increase the number of entries fetched from the associative table by modifying the `joinLimit` prop:
Expand Down

0 comments on commit 88fe712

Please sign in to comment.