Skip to content

Commit 9be0909

Browse files
committed
fix: cascader active item not expand
1 parent df5db65 commit 9be0909

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/cascader/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export default {
365365
'fieldNames',
366366
])
367367

368-
let options = this.options
368+
let options = props.options
369369
if (inputValue) {
370370
options = this.generateFilteredOptions(prefixCls)
371371
}

components/vc-cascader/Cascader.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ export default {
9292
value (val, oldValue) {
9393
if (!shallowEqualArrays(val, oldValue)) {
9494
const newValues = {
95-
value: oldValue || [],
96-
activeValue: oldValue || [],
95+
sValue: val || [],
96+
sActiveValue: val || [],
9797
}
9898
// allow activeValue diff from value
9999
// https://github.com/ant-design/ant-design/issues/2767
100100
if (hasProp(this, 'loadData')) {
101-
delete newValues.activeValue
101+
delete newValues.sActiveValue
102102
}
103103
this.setState(newValues)
104104
}

0 commit comments

Comments
 (0)