mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2025-02-17 17:40:31 +08:00
feat(arco): don't trigger onRowClicked method when clicking table's radios or checkboxs
This commit is contained in:
parent
6f1f5eb3ec
commit
75dff38d8a
@ -509,6 +509,10 @@ export const Table = implementRuntimeComponent({
|
||||
? record => {
|
||||
return {
|
||||
onClick(event: React.ChangeEvent<HTMLButtonElement>) {
|
||||
// When user clicks a radio or checkbox, the 'rowClicked' event should not be triggered.
|
||||
const OPERATION_COLUMN_CLASS_SELECTOR = '.arco-table-operation';
|
||||
if (event.target.closest(OPERATION_COLUMN_CLASS_SELECTOR) !== null)
|
||||
return;
|
||||
const tr = event.target.closest('tr');
|
||||
const tbody = tr?.parentNode;
|
||||
if (tbody) {
|
||||
|
Loading…
Reference in New Issue
Block a user