Skip to content

Commit 09a1a49

Browse files
committed
BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
1 parent 228c133 commit 09a1a49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/Table/src/hooks/useCustomSelection.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ export function useCustomSelection(
387387
key={'j-select__' + recordKey}
388388
checked={selectedKeys.value.includes(recordKey)}
389389
onUpdate:checked={(checked) => onSelect(record, checked)}
390+
// update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
391+
onClick={(e) => e.stopPropagation()}
392+
// update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
390393
/>
391394
);
392395
}
@@ -412,6 +415,9 @@ export function useCustomSelection(
412415
key={'j-select__' + recordKey}
413416
checked={selectedKeys.value.includes(recordKey)}
414417
onUpdate:checked={(checked) => onSelect(record, checked)}
418+
// update-begin--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
419+
onClick={(e) => e.stopPropagation()}
420+
// update-end--author:liaozhiyang---date:20230326---for:【QQYUN-8694】BasicTable在使用clickToRowSelect=true下,selection-change 事件在触发多次
415421
/>
416422
);
417423
}

0 commit comments

Comments
 (0)