From 8c93c39a4d8509cea49d402809507c872347d484 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Tue, 10 Nov 2020 11:23:46 -0300 Subject: [PATCH 1/3] FIx typos --- docs/Authentication.md | 2 +- docs/Inputs.md | 2 +- docs/List.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Authentication.md b/docs/Authentication.md index 9908104a4f4..bba985d357f 100644 --- a/docs/Authentication.md +++ b/docs/Authentication.md @@ -777,7 +777,7 @@ const MyPage = () => { ### `useGetPermissions()` Hook -React-admin also exposes a `useGetPermissions()` hook, returning a callback to call `authProvider.getPermissions()` on demand. In practice, you seldom need this hook - `usePermissions` covers most authorizatoin needs, and manages the loading state for you. +React-admin also exposes a `useGetPermissions()` hook, returning a callback to call `authProvider.getPermissions()` on demand. In practice, you seldom need this hook - `usePermissions` covers most authorization needs, and manages the loading state for you. Here is an example usage: diff --git a/docs/Inputs.md b/docs/Inputs.md index d2c3f6cc371..22cb10d6f31 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -1598,7 +1598,7 @@ The child component receives the following props from ``: - `setPagination`: : function to call to update the pagination of the request for possible values - `setSort`: function to call to update the sorting of the request for possible values -**Tip**: Why does `` use the `dataProvider.getMany()` method with a single value `[id]` instead of `dataProvider.getOne()` to fetch the record for the current value? Because when there are many `` for the same resource in a form (for instance when inside an ``), react-admin *aggregates* the calls to `dataProvider.getMany()` into a single one with `[id1, id2, ...)]`. This speeds up the UI and avoids hitting the API too much. +**Tip**: Why does `` use the `dataProvider.getMany()` method with a single value `[id]` instead of `dataProvider.getOne()` to fetch the record for the current value? Because when there are many `` for the same resource in a form (for instance when inside an ``), react-admin *aggregates* the calls to `dataProvider.getMany()` into a single one with `[id1, id2, ...]`. This speeds up the UI and avoids hitting the API too much. ### `` diff --git a/docs/List.md b/docs/List.md index 3541759f312..44e69326083 100644 --- a/docs/List.md +++ b/docs/List.md @@ -2226,7 +2226,7 @@ For mobile devices, a `` is often unusable - there is simply not enoug | `rightAvatar` | Optional | `Function` | - | When present, the `` renders a `` after the `` | | `rightIcon` | Optional | `Function` | - | When present, the `` renders a `` after the `` | | `className` | Optional | `string` | - | Applied to the root element | -| `rowStyle` | Optional | `Function` | - | Applied to the `` styles prop. The function get's called for each row. Receives the current record and index as arguments and should return a style object.| +| `rowStyle` | Optional | `Function` | - | Applied to the `` styles prop. The function gets called for each row. Receives the current record and index as arguments and should return a style object. | ### Usage @@ -2248,7 +2248,7 @@ export const PostList = (props) => ( secondaryText={record => `${record.views} views`} tertiaryText={record => new Date(record.published_at).toLocaleDateString()} linkType={record => record.canEdit ? "edit" : "show"} - rowStyle={postRowStyle} + rowStyle={postRowStyle} /> ); From 6c3671679535d1e7e822974ce3970c059bba1a91 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Tue, 10 Nov 2020 11:40:19 -0300 Subject: [PATCH 2/3] Fix typo --- docs/List.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/List.md b/docs/List.md index 44e69326083..35747bf08e7 100644 --- a/docs/List.md +++ b/docs/List.md @@ -1825,7 +1825,7 @@ The `` is an **iterator** component: it gets an array of ids and a dat ### Body element -By default, `` renders its body using ``, an internal react-admin component. You can pass a custom component as the `body` prop to override that default. And by the way, `` has a `row` prop set to `` by default for the same purpose. `` receives the row `record`, the `resource`, and a copy of the `` children. That means you can create custom datagrid logic without copying several components from the react-admin source. +By default, `` renders its body using ``, an internal react-admin component. You can pass a custom component as the `body` prop to override that default. And by the way, `` has a `row` prop set to `` by default for the same purpose. `` receives the row `record`, the `resource`, and a copy of the `` children. That means you can create custom `` logic without copying several components from the react-admin source. For instance, the `` prop allows to hide the selection checkbox for some records. To show a *disabled* checkbox instead of hiding it, you can override `` and `` as follows: From 33caac3f136caf0558cd4cf3b03593fde7351a4d Mon Sep 17 00:00:00 2001 From: asvarcas Date: Tue, 10 Nov 2020 12:06:32 -0300 Subject: [PATCH 3/3] Fix another typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9af5561fdfe..975f3cdb751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ * Add ability to infer field type from data ([5485](https://github.com/marmelab/react-admin/pull/5485)) ([fzaninotto](https://github.com/fzaninotto)) * Add rest props sanitizer for Fields and Inputs ([5392](https://github.com/marmelab/react-admin/pull/5392)) ([fzaninotto](https://github.com/fzaninotto)) * Speed up show & hide filter ([5411](https://github.com/marmelab/react-admin/pull/5411)) ([fzaninotto](https://github.com/fzaninotto)) -* Fix typo on bulk axction labels in French translation ([5494](https://github.com/marmelab/react-admin/pull/5494)) ([etienne-bondot](https://github.com/etienne-bondot)) +* Fix typo on bulk action labels in French translation ([5494](https://github.com/marmelab/react-admin/pull/5494)) ([etienne-bondot](https://github.com/etienne-bondot)) * Fix `` with `target` prop fails TypeScript compilation ([5488](https://github.com/marmelab/react-admin/pull/5488)) ([fzaninotto](https://github.com/fzaninotto)) * Fix crash when navigating away during undo period ([5487](https://github.com/marmelab/react-admin/pull/5487)) ([fzaninotto](https://github.com/fzaninotto)) * Fix `` does not update on `to` prop change ([5483](https://github.com/marmelab/react-admin/pull/5483)) ([rkfg](https://github.com/rkfg))