forked from p96170835/amis
修复combo未设置唯一值,修改单个item时无法验证的问题
This commit is contained in:
parent
40710a6d2f
commit
8810e4dfe5
|
@ -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