fixed: 修改多选示例

This commit is contained in:
huyueb 2017-09-08 14:52:05 +08:00
parent 3a3df49637
commit 264a51b571
3 changed files with 22 additions and 22 deletions

View File

@ -113,26 +113,26 @@ export class Demo12 extends Component {
// self.props.onSelIds(selIds);
};
renderColumnsMultiSelect(columns) {
// const { data,checkedArray } = this.state;
const { data,checkedArray } = this.state;
const { multiSelect } = this.props;
let select_column = {};
// let indeterminate_bool = false;
let indeterminate_bool = false;
// let indeterminate_bool1 = true;
if (multiSelect && multiSelect.type === "checkbox") {
// let i = checkedArray.length;
// while(i--){
// if(checkedArray[i]){
// indeterminate_bool = true;
// break;
// }
// }
let i = checkedArray.length;
while(i--){
if(checkedArray[i]){
indeterminate_bool = true;
break;
}
}
let defaultColumns = [
{
title: (
<Checkbox
className="table-checkbox"
checked={this.state.checkedAll}
indeterminate={indeterminate_bool&&!this.state.checkedAll}
onHandleChange={this.onAllCheckChange}
/>
),

File diff suppressed because one or more lines are too long

View File

@ -42,7 +42,7 @@
"devDependencies": {
"bee-animate": "latest",
"bee-button": "latest",
"bee-checkbox": "^0.2.2",
"bee-checkbox": "^0.2.4",
"bee-form-control": "^0.1.8",
"bee-icon": "0.0.5",
"bee-input-group": "^0.1.12",