From dd7e5c56fcd24c3d21ed03be33411b98015a8c37 Mon Sep 17 00:00:00 2001 From: erwanMarmelab Date: Thu, 19 Dec 2024 16:30:07 +0100 Subject: [PATCH] [Doc]: Backport `ReferenceManyToMany`'s error support documentation --- docs/ReferenceManyToManyInput.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/ReferenceManyToManyInput.md b/docs/ReferenceManyToManyInput.md index 0e593958fe..d2f8fe7624 100644 --- a/docs/ReferenceManyToManyInput.md +++ b/docs/ReferenceManyToManyInput.md @@ -225,6 +225,25 @@ By default, react-admin displays at most 25 entries from the associative table ( ``` +You can also use it to pass an `onError` function as follows: + +{% raw %} + +```tsx + console.warn({ error, step, data }) + }} +> + {/* ... */} + +``` + +{% endraw %} + ## `perPageChoices` `` 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.