Skip to content

Commit

Permalink
Merge pull request alibaba-fusion#1375 from myronliu347/master
Browse files Browse the repository at this point in the history
Add custom cascader indeterminate & checked
  • Loading branch information
youluna authored Nov 20, 2019
2 parents 381ffe1 + 4a12b26 commit 9afba2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cascader/cascader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,13 @@ export default class Cascader extends Component {

if (multiple) {
props.checkable = !(canOnlyCheckLeaf && canExpand);
props.checked = value.indexOf(item.value) > -1;
props.checked =
value.indexOf(item.value) > -1 || !!item.checked;
props.indeterminate =
checkStrictly || canOnlyCheckLeaf
(checkStrictly || canOnlyCheckLeaf
? false
: this.indeterminate.indexOf(item.value) > -1;
: this.indeterminate.indexOf(item.value) >
-1) || !!item.indeterminate;
props.checkboxDisabled = !!item.checkboxDisabled;
props.onCheck = this.handleCheck.bind(this, item.value);
} else {
Expand Down

0 comments on commit 9afba2e

Please sign in to comment.