Skip to content

Commit

Permalink
Merge pull request #5517 from ValentinnDimitroff/code-examples-fixes
Browse files Browse the repository at this point in the history
Editing code examples errors and typos
  • Loading branch information
fzaninotto authored Nov 12, 2020
2 parents cf41914 + 03e78cd commit 1e2e575
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ra-core/src/controller/useListContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { Record } from '../types';
* import { useListContext } from 'react-admin';
*
* const MyList = () => {
* const { data, id, loaded } = useListContext();
* const { data, ids, loaded } = useListContext();
* if (!loaded) {
* return <>Loading...</>;
* }
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/ReferenceField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { ClassesOverride } from '../types';
* as arguments and return a string
*
* @example
* <ReferenceField label="User" source="userId" reference="users" link={(reference, record) => "/path/to/${reference}/${record}"}>
* <ReferenceField label="User" source="userId" reference="users" link={(record, reference) => "/path/to/${reference}/${record}"}>
* <TextField source="name" />
* </ReferenceField>
*
Expand Down
1 change: 1 addition & 0 deletions packages/ra-ui-materialui/src/list/SimpleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const useStyles = makeStyles(
* - rightAvatar: same
* - rightIcon: same
* - linkType: 'edit' or 'show', or a function returning 'edit' or 'show' based on the record
* - rowStyle: function returning a style object based on (record, index)
*
* @example // Display all posts as a List
*
Expand Down

0 comments on commit 1e2e575

Please sign in to comment.