mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix: 修复combo中配置 clearValueOnHidden 无法删除item问题 (#2454)
This commit is contained in:
parent
efc2359826
commit
a1d12ebdac
@ -320,10 +320,6 @@ export function wrapControl<
|
||||
this.hook3 && this.props.removeHook?.(this.hook3, 'flush');
|
||||
// this.lazyEmitChange.flush();
|
||||
|
||||
if (this.model?.clearValueOnHidden) {
|
||||
this.props.onChange?.(undefined, this.model.name);
|
||||
}
|
||||
|
||||
this.lazyEmitChange.cancel();
|
||||
this.reaction?.();
|
||||
this.disposeModel();
|
||||
@ -347,6 +343,9 @@ export function wrapControl<
|
||||
isAlive(formItem) &&
|
||||
formItem.removeSubFormItem(this.model);
|
||||
|
||||
this.model.clearValueOnHidden &&
|
||||
this.model.form?.deleteValueByName(this.model.name);
|
||||
|
||||
rootStore.removeStore(this.model);
|
||||
}
|
||||
delete this.model;
|
||||
|
Loading…
Reference in New Issue
Block a user