diff --git a/src/lib/multiSelect.js b/src/lib/multiSelect.js index 14f7885..0652269 100644 --- a/src/lib/multiSelect.js +++ b/src/lib/multiSelect.js @@ -193,10 +193,18 @@ export default function multiSelect(Table, Checkbox) { return _defaultColumns.concat(columns); } + // 实现行点击时触发多选框勾选的需求 + onRowClick = (record,index,event) =>{ + this.onCheckboxChange('',record, index)(); + if( this.props.onRowClick ){ + this.props.onRowClick(record,index,event); + } + } + render() { const {columns} = this.props; const {data} = this.state; - return + return
} }; }