mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +08:00
修复 Nested-Select 配置 source 问题 (#1570)
* 修复nested-select 配置source问题 * fix
This commit is contained in:
parent
ecd57a32ab
commit
aef8544b68
@ -22,6 +22,7 @@ import {findDOMNode} from 'react-dom';
|
||||
import {ResultBox, Spinner} from '../../components';
|
||||
import xor from 'lodash/xor';
|
||||
import union from 'lodash/union';
|
||||
import {isEqual} from 'lodash';
|
||||
|
||||
/**
|
||||
* Nested Select
|
||||
@ -68,6 +69,14 @@ export default class NestedSelectControl extends React.Component<
|
||||
this.target = ref;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: NestedSelectProps) {
|
||||
if (prevProps.options !== this.props.options) {
|
||||
this.setState({
|
||||
stack: [this.props.options]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleOutClick(e: React.MouseEvent<any>) {
|
||||
const {options} = this.props;
|
||||
|
Loading…
Reference in New Issue
Block a user