Skip to content

Commit

Permalink
Merge pull request marmelab#2854 from ofpau/patch-1
Browse files Browse the repository at this point in the history
Fix SelectField example snippet on the docs
  • Loading branch information
Gildas Garcia authored Feb 6, 2019
2 parents 24c39f4 + 64f4196 commit 925408c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ const choices = [
{ id: 456, first_name: 'Jane', last_name: 'Austen' },
];
const FullNameField = ({ record }) => <Chip>{record.first_name} {record.last_name}</Chip>;
<SelectField source="gender" choices={choices} optionText={<FullNameField />}/>
<SelectField source="author_id" choices={choices} optionText={<FullNameField />}/>
```

The current choice is translated by default, so you can use translation identifiers as choices:
Expand Down

0 comments on commit 925408c

Please sign in to comment.