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

Get values asynchronously when clicking copy #186

Closed
tongtongde opened this issue Aug 3, 2022 · 1 comment
Closed

Get values asynchronously when clicking copy #186

tongtongde opened this issue Aug 3, 2022 · 1 comment

Comments

@tongtongde
Copy link

When you click Copy, you get the value asynchronously, and then you can't get the latest value
const onClick= () => { setCopyText('text'); }; <CopyToClipboard text={copyText} > <Typography.Link> <ShareAltOutlined onClick={onClick} /> </Typography.Link> </CopyToClipboard>
consider exposing the copy method?

@nkbt
Copy link
Owner

nkbt commented Aug 3, 2022

Why would you need react-copy-to-clipboard then? Just use copy-to-clipboard lib directly

@nkbt nkbt closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants