amis-saas-7095 [Bug] 前端select调用api 预览态返回设计态 接口配置异常

Change-Id: Ia87ee8b0f83f9e628dec44e5c24f9f4a65f54f88
This commit is contained in:
RickCole21 2022-09-19 19:53:16 +08:00
parent a9af5e1ec8
commit 809c430362

View File

@ -290,7 +290,10 @@ export default class OptionControl extends React.Component<
*/
@autobind
handleSourceChange(source: 'custom' | 'api' | 'apicenter') {
this.setState({source: source}, this.onChange);
const {name, onChange} = this.props;
this.setState({source}, () => {
name && onChange?.(undefined);
});
}
/**