mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
修复combo未设置唯一值,修改单个item时无法验证的问题
This commit is contained in:
parent
6bcc3ac075
commit
6c30ffe46a
@ -303,12 +303,13 @@ export default class FormControl extends React.Component<FormControlProps, any>
|
||||
} = this.props;
|
||||
|
||||
if (this.model) {
|
||||
this.model.validate(this.hook);
|
||||
|
||||
if (form.parentStore && form.parentStore.storeType === 'ComboStore') {
|
||||
const combo = form.parentStore as IComboStore;
|
||||
const group = combo.uniques.get(this.model.name) as IUniqueGroup;
|
||||
group && group.items.forEach(item => item.validate());
|
||||
group && group.items.forEach(item => item !== this.model && item.validate());
|
||||
} else {
|
||||
this.model.validate(this.hook);
|
||||
form.getItemsByName(this.model.name)
|
||||
.forEach(item => item !== this.model && item.validate())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user