From d5aace6625421161a1681b29e4fc7e0017986bd2 Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Fri, 19 Feb 2021 21:53:06 +0100 Subject: [PATCH] Fix typos in useReferenceArrayInputContext doc --- docs/Inputs.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/Inputs.md b/docs/Inputs.md index 85f924225a8..42f692ece00 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -1483,13 +1483,13 @@ In addition to the `ReferenceArrayInputContext`, the `` als ### `useReferenceArrayInputContext` -The [``](#referencearrayinput) component take care of fetching the data, and put that data in a context called `ReferenceArrayInputContext` so that it’s available for its descendants. This context also stores filters, pagination, sort state, and provides callbacks to update them. +The [``](#referencearrayinput) component takes care of fetching the data, and put that data in a context called `ReferenceArrayInputContext` so that it’s available for its descendants. This context also stores filters, pagination, sort state, and provides callbacks to update them. Any component can grab information from the `ReferenceArrayInputContext` using the `useReferenceArrayInputContext` hook. Here is what it returns: ```js const { - choices, // An array of records mathcing both the current input value and the filters + choices, // An array of records matching both the current input value and the filters error, // A potential error which may have occured while fetching the data warning, // A potential warning regarding missing references loaded, // boolean that is false until the data is available @@ -1497,9 +1497,8 @@ const { setFilter, // a callback to update the filters, e.g. setFilters({ q: 'query' }) setPagination, // a callback to change the pagination, e.g. setPagination({ page: 2, perPage: 50 }) setSort, // a callback to change the sort, e.g. setSort({ field: 'name', order: 'DESC' }) - - setSortForList, // // a callback to set the sort with the same signature as the one from the ListContext. This is required to not break backward compatibility and will be removed in v4. -} + setSortForList, // a callback to set the sort with the same signature as the one from the ListContext. This is required to aboid breaking backward compatibility and will be removed in v4 +} = useReferenceArrayInputContext(); ``` ### ``