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] Add a link to Clipboard List Field third-party package #4659

Merged
merged 2 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion docs/Ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ title: "Ecosystem"
- [User Interface](#user-interface)
- [Miscellaneous](#miscellaneous)

## Inputs and Fields
## Fields

See the [Field](./Fields.md#third-party-components) page.

## Inputs

See the [Input](./Inputs.md#third-party-components) page.

Expand Down
10 changes: 9 additions & 1 deletion docs/Fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const TagsField = ({ record }) => (
))}
</ul>
)
TagsField.defaultProps = {
TagsField.defaultProps = {
addLabel: true
};
```
Expand Down Expand Up @@ -894,6 +894,14 @@ PriceField.defaultProps = {
```
{% endraw %}


## Third-Party Components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add it to the Ecosystem documentation instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I moved all third-part links to Ecosystem, to be consistent.
This could be part of this PR or another one, your choice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So your last changes makes me realize that what I asked you is wrong, sorry. The third party field should be added to the Fields doc, and the Ecosystem should be updated to add a link to the third party fields.


You can find components for react-admin in third-party repositories.

- [OoDeLally/react-admin-clipboard-list-field](https://github.com/OoDeLally/react-admin-clipboard-list-field): a quick and customizable copy-to-clipboard field.


## Writing Your Own Field Component

If you don't find what you need in the list above, you can write your own Field component. It must be a regular React component, accepting not only a `source` attribute, but also a `record` attribute. React-admin will inject the `record` based on the API response data at render time. The field component only needs to find the `source` in the `record` and display it.
Expand Down