Skip to content

[Doc] Add a new third-party component huyanhvn/react-admin-clipboard-field #10736

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

Merged
merged 2 commits into from
May 21, 2025

Conversation

huyanhvn
Copy link

Add a new third-party component huyanhvn/react-admin-clipboard-field.

Problem

None. This is just a suggestion.

Solution

Hello team, I've created this wrapper for TextField that copies the text into clipboard. I've been finding it quite useful. If you think it can be useful for others too, please accept this suggestion into the docs. Thank you.

How To Test

Just copy src/clipboard-field.tsx to your source directory and use ClipboardField anywhere you would use a TextField.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why): No, because this is a doc update.
  • The PR includes one or several stories (if not possible, describe why): No, because this is a suggestion.
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

Add a new third-party component huyanhvn/react-admin-clipboard-field.
@fzaninotto
Copy link
Member

We already have one such field (three lines before the line you added), so my advice is to collaborate with the other contributor rather than compete against them - it doesn't bring value to have two small packahgs like that for react-admin users.

@fzaninotto fzaninotto closed this May 12, 2025
@huyanhvn
Copy link
Author

Actually the 2 fields behave differently and are used for different purposes.

@fzaninotto
Copy link
Member

Can you explain the differences in more detail? Because it's not obvious from the line you've added.

@huyanhvn
Copy link
Author

Sure. Here is my understanding:

react-admin-clipboard-list-field: a custom field that references a field in a record, then displays various string versions of that field and allows you to copies each into clipboard.
react-admin-clipboard-field: a wrapper around TextField, except with a copy-to-clipboard icon upon hovering that allows to copy field text into clipboard. Use it just like how you'd use TextField (on List page, Show page, forms, etc.).

@slax57
Copy link
Contributor

slax57 commented May 21, 2025

Indeed, to me they are different. Reopening.

@slax57 slax57 reopened this May 21, 2025
@slax57 slax57 added this to the 5.8.3 milestone May 21, 2025
@slax57 slax57 changed the title Add a new third-party component huyanhvn/react-admin-clipboard-field to docs. [Doc] Add a new third-party component huyanhvn/react-admin-clipboard-field May 21, 2025
@slax57 slax57 merged commit 3555a87 into marmelab:master May 21, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants