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