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

[Doc] Fix emptyText prop description in Fields documenation #6525

Merged
merged 1 commit into from
Aug 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/Fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ All Field components accept the following props:
| `formClassName` | Optional | `string` | - | A class name (usually generated by JSS) to customize the look and feel of the field container when it is used inside `<SimpleForm>` or `<TabbedForm>` |
| `addLabel` | Optional | `boolean` | `false` | Defines the visibility of the label when the field is used in `<SimpleForm>`, `<FormTab>`, `<SimpleShowLayout>`, or `<Tab>`. It's `true` for all react-admin `<Field>` components. |
| `textAlign` | Optional | `string` | 'left' | Defines the text alignment inside a cell. Set to `right` for right alignment (e.g. for numbers) |
| `emptyText` | Optional | `string` | '' | Defines a text to be shown when a field has no value |
| `emptyText` | Optional | `string` | '' | Defines a text to be shown when a field has no value (not supported in array fields) |

**Tip**: You can use field components inside the `Edit` or `Show` views, too:

Expand Down Expand Up @@ -714,7 +714,7 @@ And here is how to display all the tags of the current post as `<Chip>` componen
| ---------- | -------- | ------ | ------- | ------------------------------------------------------------- |
| `fieldKey` | Optional | string | - | Name for the field to be used as key when displaying children |

`<ArrayField>` also accepts the [common field props](./Fields.md#common-field-props).
`<ArrayField>` also accepts the [common field props](./Fields.md#common-field-props), except `emptyText` (use the child `empty` prop instead).

#### Usage

Expand Down Expand Up @@ -907,7 +907,7 @@ export const PostList = (props) => (
| `perPage` | Optional | `number` | 25 | Maximum number of referenced records to fetch |
| `sort` | Optional | `{ field, order }` | `{ field: 'id', order: 'DESC' }` | Sort order to use when fetching the related records, passed to `getManyReference()` |

`<ReferenceManyField>` also accepts the [common field props](./Fields.md#common-field-props).
`<ReferenceManyField>` also accepts the [common field props](./Fields.md#common-field-props), except `emptyText` (use the child `empty` prop instead).

#### Usage

Expand Down Expand Up @@ -1080,7 +1080,7 @@ export const PostList = (props) => (
| `perPage` | Optional | `number` | 1000 | Maximum number of results to display |
| `sort` | Optional | `{ field, order }` | `{ field: 'id', order: 'DESC' }` | Sort order to use when displaying the related records (the sort is done client-side) |

`<ReferenceArrayField>` also accepts the [common field props](./Fields.md#common-field-props).
`<ReferenceArrayField>` also accepts the [common field props](./Fields.md#common-field-props), except `emptyText` (use the child `empty` prop instead).

#### CSS API

Expand Down