fix: 修改checkbox属性修改

This commit is contained in:
huyueb 2017-09-12 09:50:01 +08:00
parent 9fc4b6e5ad
commit 23980401f0
2 changed files with 3 additions and 4 deletions

View File

@ -100,7 +100,6 @@ class Demo12 extends Component {
// } else { // } else {
// selIds.push(record[id]); // selIds.push(record[id]);
// } // }
debugger;
checkedArray[index] = !self.state.checkedArray[index]; checkedArray[index] = !self.state.checkedArray[index];
for (var i = 0; i < self.state.checkedArray.length; i++) { for (var i = 0; i < self.state.checkedArray.length; i++) {
if (!checkedArray[i]) { if (!checkedArray[i]) {
@ -138,7 +137,7 @@ class Demo12 extends Component {
className="table-checkbox" className="table-checkbox"
checked={this.state.checkedAll} checked={this.state.checkedAll}
indeterminate={indeterminate_bool&&!this.state.checkedAll} indeterminate={indeterminate_bool&&!this.state.checkedAll}
onHandleChange={this.onAllCheckChange} onChange={this.onAllCheckChange}
/> />
), ),
key: "checkbox", key: "checkbox",
@ -149,7 +148,7 @@ class Demo12 extends Component {
<Checkbox <Checkbox
className="table-checkbox" className="table-checkbox"
checked={this.state.checkedArray[index]} checked={this.state.checkedArray[index]}
onHandleChange={this.onCheckboxChange.bind(this, text, record, index)} onChange={this.onCheckboxChange.bind(this, text, record, index)}
/> />
); );
} }

File diff suppressed because one or more lines are too long