Skip to content

Commit

Permalink
fix(TreeSelect): calculate all checked value only when treeCheckedStr…
Browse files Browse the repository at this point in the history
…ategy=all, close#3936
  • Loading branch information
lakerswgq authored and 潕量 committed Jun 10, 2022
1 parent 3bd694e commit 35ff149
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tree-select/tree-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ class TreeSelect extends Component {
const nonExistentValueKeys = this.getNonExistentValueKeys();

let keys = this.getKeysByValue(value);
keys = getAllCheckedKeys(keys, this.state._k2n, this.state._p2n);

switch (treeCheckedStrategy) {
case 'parent':
Expand All @@ -437,6 +436,8 @@ class TreeSelect extends Component {
keys = filterParentKey(keys, this.state._k2n, this.state._p2n);
break;
default:
// calculate all checked value only when treeCheckedStrategy=all, close #3936
keys = getAllCheckedKeys(keys, this.state._k2n, this.state._p2n);
break;
}

Expand Down

0 comments on commit 35ff149

Please sign in to comment.