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
This commit is contained in:
parent
47c34e1100
commit
27fb2b2db0
@ -172,8 +172,9 @@ export const getIdRender = (value, copyable = true, isLink = true) => {
|
|||||||
const onClick = (e) => {
|
const onClick = (e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
const { nodeName = '', className = '' } = e.target || {};
|
const { nodeName = '', className = '' } = e.target || {};
|
||||||
|
const copyNodeNames = ['svg', 'path'];
|
||||||
const isCopyClick =
|
const isCopyClick =
|
||||||
nodeName === 'svg' ||
|
copyNodeNames.includes(nodeName) ||
|
||||||
(isString(className) && className.includes('copy'));
|
(isString(className) && className.includes('copy'));
|
||||||
if (isCopyClick && e.stopPropagation) {
|
if (isCopyClick && e.stopPropagation) {
|
||||||
return e.stopPropagation();
|
return e.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user