fix: cascader active item not expand

pull/197/head
tangjinzhou 2018-09-17 21:17:44 +08:00
parent df5db65397
commit 9be0909031
2 changed files with 4 additions and 4 deletions

View File

@ -365,7 +365,7 @@ export default {
'fieldNames',
])
let options = this.options
let options = props.options
if (inputValue) {
options = this.generateFilteredOptions(prefixCls)
}

View File

@ -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)
}