mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix checkbox in table
This commit is contained in:
parent
1638d49892
commit
f692e62560
@ -103,7 +103,8 @@ let AntTable = React.createClass({
|
||||
}
|
||||
this.fetch();
|
||||
},
|
||||
handleSelect(rowIndex, checked) {
|
||||
handleSelect(rowIndex, e) {
|
||||
let checked = e.target.checked;
|
||||
if (checked) {
|
||||
this.state.selectedRowKeys.push(rowIndex);
|
||||
} else {
|
||||
@ -122,8 +123,9 @@ let AntTable = React.createClass({
|
||||
this.props.rowSelection.onSelect(currentRow, checked, selectedRows);
|
||||
}
|
||||
},
|
||||
handleSelectAllRow(checked) {
|
||||
var selectedRowKeys = checked ? this.state.data.map(function(item, i) {
|
||||
handleSelectAllRow(e) {
|
||||
let checked = e.target.checked;
|
||||
let selectedRowKeys = checked ? this.state.data.map(function(item, i) {
|
||||
return i + 1;
|
||||
}) : [];
|
||||
this.setState({
|
||||
|
Loading…
Reference in New Issue
Block a user