fix: cascader active item not expand
parent
df5db65397
commit
9be0909031
|
@ -365,7 +365,7 @@ export default {
|
|||
'fieldNames',
|
||||
])
|
||||
|
||||
let options = this.options
|
||||
let options = props.options
|
||||
if (inputValue) {
|
||||
options = this.generateFilteredOptions(prefixCls)
|
||||
}
|
||||
|
|
|
@ -92,13 +92,13 @@ export default {
|
|||
value (val, oldValue) {
|
||||
if (!shallowEqualArrays(val, oldValue)) {
|
||||
const newValues = {
|
||||
value: oldValue || [],
|
||||
activeValue: oldValue || [],
|
||||
sValue: val || [],
|
||||
sActiveValue: val || [],
|
||||
}
|
||||
// allow activeValue diff from value
|
||||
// https://github.com/ant-design/ant-design/issues/2767
|
||||
if (hasProp(this, 'loadData')) {
|
||||
delete newValues.activeValue
|
||||
delete newValues.sActiveValue
|
||||
}
|
||||
this.setState(newValues)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue