Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Jun 16, 2022
1 parent ceb3050 commit b8c3c2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/ReferenceArrayField.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const PostList = () => (
| ------------ | -------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `source` | Required | `string` | - | Name of the property to display |
| `reference` | Required | `string` | - | The name of the resource for the referenced records, e.g. 'tags' |
| `children` | Required | `Element` | - | The Field element used to render the referenced records |
| `children` | Required | `Element` | - | One or several elements that render a list of records based on a `ListContext` |
| `sortBy` | Optional | `string | Function` | `source` | When used in a `List`, name of the field to use for sorting when the user clicks on the column header. |
| `filter` | Optional | `Object` | - | Filters to use when fetching the related records (the filtering is done client-side) |
| `pagination` | Optional | `Element` | - | Pagination element to display pagination controls. empty by default (no pagination) |
Expand Down
6 changes: 5 additions & 1 deletion packages/ra-ui-materialui/src/field/ReferenceManyField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ ReferenceManyField.defaultProps = {
// FIXME kept for backwards compatibility, unused, to be removed in v5
export const ReferenceManyFieldView: FC<ReferenceManyFieldViewProps> = props => {
const { children, pagination } = props;

if (process.env.NODE_ENV !== 'production') {
console.error(
'<ReferenceManyFieldView> is deprecated, use <ReferenceManyField> directly'
);
}
return (
<>
{children}
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/ReferenceOneField.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement, ReactNode } from 'react';
import React, { ReactNode } from 'react';
import PropTypes from 'prop-types';
import { Typography } from '@mui/material';
import {
Expand Down

0 comments on commit b8c3c2f

Please sign in to comment.