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

Pass a third param containing the click Event to onCopy #130

Open
Kauyumari opened this issue Mar 18, 2020 · 3 comments
Open

Pass a third param containing the click Event to onCopy #130

Kauyumari opened this issue Mar 18, 2020 · 3 comments
Labels

Comments

@Kauyumari
Copy link

I encountered an issue in which I needed to stop click propagation to bigger components but I didn't find any way to capture the event. Please fix this issue.

@alisaliso
Copy link

Hello, does anyone working on this?

@nkbt
Copy link
Owner

nkbt commented Jul 28, 2020

Not really. Please use copy-to-clipboard library directly instead. If you want to work with event, there is no need for react-copy-to-clipboard.

@nkbt nkbt added the wontfix label Jul 28, 2020
@Kamikozz
Copy link

Kamikozz commented Feb 15, 2022

Yeah, it is just needed me 2 ;(
// UPD: figured out, that constructing my own component with onClick prop (or something like that) that is passed to children of CopyToClipBoard will give needed behaviour

example:

<CopyToClipboardContainer>
      <Box
        className={clsx(
          withIcon && classes.withIcon,
          className,
        )}
        onClick={(e) => e.stopPropagation()}
      >
        {children}
        {withIcon && <Box className={clsx(classes.icon, classNameIcon)}><CopyIcon /></Box>}
      </Box>
    </CopyToClipboardContainer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants