Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Fix typos #5412

Merged
merged 1 commit into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const UserProfile = ({ record }) => {

```jsx
// syntax
const { data, loading, loaded, error } = useGetMAny(resource, ids, options);
const { data, loading, loaded, error } = useGetMany(resource, ids, options);

// example
import { useGetMany } from 'react-admin';
Expand Down Expand Up @@ -315,7 +315,7 @@ const PostComments = ({ post_id }) => {
'post_id',
post_id,
{ page: 1, perPage: 10 },
{ field: 'published_at', order: 'DESC' }
{ field: 'published_at', order: 'DESC' },
{},
'posts',
);
Expand Down Expand Up @@ -359,7 +359,7 @@ const IncreaseLikeButton = ({ record }) => {
const diff = { likes: record.likes + 1 };
const [update, { loading, error }] = useUpdate('likes', record.id, diff, record);
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={update}>Like</div>;
return <button disabled={loading} onClick={update}>Like</button>;
};
```

Expand All @@ -382,22 +382,22 @@ const BulkResetViewsButton = ({ selectedIds }) => {

```jsx
// syntax
const [delete, { data, loading, loaded, error }] = useDelete(resource, id, previousData, options);
const [deleteOne, { data, loading, loaded, error }] = useDelete(resource, id, previousData, options);

// example
import { useDelete } from 'react-admin';
const DeleteButton = ({ record }) => {
const [deleteOne, { loading, error }] = useDelete('likes', record.id);
if (error) { return <p>ERROR</p>; }
return <button disabled={loading} onClick={deleteOne}>Delete</div>;
return <button disabled={loading} onClick={deleteOne}>Delete</button>;
};
```

### `useDeleteMany`

```jsx
// syntax
const [delete, { data, loading, loaded, error }] = useDeleteMany(resource, ids, options);
const [deleteOne, { data, loading, loaded, error }] = useDeleteMany(resource, ids, options);

// example
import { useDeleteMany } from 'react-admin';
Expand Down