Skip to content

Commit

Permalink
Merge pull request #4738 from marmelab/translateChoix-referencefield
Browse files Browse the repository at this point in the history
Fix translateChoice warning in ReferenceField
  • Loading branch information
Luwangel authored Apr 30, 2020
2 parents e591abc + 6f755d4 commit 2ed109b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ra-ui-materialui/src/field/ReferenceField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ReferenceField.propTypes = {
resource: PropTypes.string,
sortBy: PropTypes.string,
source: PropTypes.string.isRequired,
translateChoice: PropTypes.func,
translateChoice: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
linkType: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
Expand Down Expand Up @@ -245,7 +245,7 @@ ReferenceFieldView.propTypes = {
PropTypes.oneOf([false]),
]) as React.Validator<string | false>,
source: PropTypes.string,
translateChoice: PropTypes.bool,
translateChoice: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
};

const PureReferenceFieldView = memo(ReferenceFieldView);
Expand Down

0 comments on commit 2ed109b

Please sign in to comment.