prevent bubbling

This commit is contained in:
fmtabbara
2022-04-29 10:45:43 +01:00
parent 31c4fc6807
commit 8bbffb6a88
@@ -13,7 +13,8 @@ export const CopyToClipboard: React.FC<{
}> = ({ value, tooltip, onCopy, sx }) => {
const copy = useClipboard();
const [showConfirmation, setShowConfirmation] = React.useState<boolean>(false);
const handleCopy = () => {
const handleCopy = (e: React.MouseEvent<SVGSVGElement>) => {
e.stopPropagation();
setShowConfirmation(true);
copy.copy(value);
if (onCopy) {