From 27fb2b2db04e00814abb9cf104354c589835a9a2 Mon Sep 17 00:00:00 2001 From: zhangjingwei Date: Wed, 19 Oct 2022 10:52:45 +0800 Subject: [PATCH] fix: fix the row auto selected when click the copy button edge When click the copy button edge, the event target's node name maybe 'path', not 'svg', so add 'path' to the copy button click check Change-Id: I48b12a4a002d097afa8703fe66157ba31bf6b126 --- src/utils/table.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/table.jsx b/src/utils/table.jsx index b5123c95..20f44d5e 100644 --- a/src/utils/table.jsx +++ b/src/utils/table.jsx @@ -172,8 +172,9 @@ export const getIdRender = (value, copyable = true, isLink = true) => { const onClick = (e) => { if (e) { const { nodeName = '', className = '' } = e.target || {}; + const copyNodeNames = ['svg', 'path']; const isCopyClick = - nodeName === 'svg' || + copyNodeNames.includes(nodeName) || (isString(className) && className.includes('copy')); if (isCopyClick && e.stopPropagation) { return e.stopPropagation();