优化点选事件

This commit is contained in:
2betop 2020-06-01 14:39:29 +08:00
parent 632fee92ba
commit 9cf54956b9

View File

@ -106,7 +106,10 @@ export class TableCheckboxes extends Checkboxes<TableCheckboxesProps> {
const checked = valueArray.indexOf(option) !== -1;
return (
<tr key={rowIndex} onClick={() => this.toggleOption(option)}>
<tr
key={rowIndex}
onClick={e => e.defaultPrevented || this.toggleOption(option)}
>
<td className={cx('Table-checkCell')}>
<Checkbox size="sm" checked={checked} />
</td>