mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: 修复 onBulkChange 可能不存在导致的报错 (#2575)
* fix: 修复 onBulkChange 可能不存在导致的报错 * 漏了一处
This commit is contained in:
parent
825b36e65c
commit
c6aea71b31
@ -793,7 +793,7 @@ export default class ImageControl extends React.Component<
|
||||
}
|
||||
: files[0]
|
||||
);
|
||||
onBulkChange(toSync);
|
||||
onBulkChange && onBulkChange(toSync);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ export default class StaticControl extends React.Component<StaticProps, any> {
|
||||
);
|
||||
}
|
||||
|
||||
onBulkChange(values, saveImmediately === true);
|
||||
onBulkChange && onBulkChange(values, saveImmediately === true);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -572,9 +572,10 @@ export function wrapControl<
|
||||
if (!key || key === name) {
|
||||
this.handleChange(value);
|
||||
} else {
|
||||
onBulkChange({
|
||||
[key]: value
|
||||
});
|
||||
onBulkChange &&
|
||||
onBulkChange({
|
||||
[key]: value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ export default class Service extends React.Component<ServiceProps> {
|
||||
afterSchemaFetch(schema: any) {
|
||||
const {onBulkChange, formStore} = this.props;
|
||||
if (formStore && schema?.data && onBulkChange) {
|
||||
onBulkChange(schema.data);
|
||||
onBulkChange && onBulkChange(schema.data);
|
||||
}
|
||||
|
||||
this.initInterval(schema);
|
||||
|
Loading…
Reference in New Issue
Block a user