forked from p96170835/amis
Merge pull request #32 from catchonme/master
修复combo未设置唯一值,修改单个item时无法验证的问题
This commit is contained in:
commit
d1d45cb475
|
@ -303,10 +303,10 @@ export default class FormControl extends React.Component<FormControlProps, any>
|
|||
} = this.props;
|
||||
|
||||
if (this.model) {
|
||||
if (form.parentStore && form.parentStore.storeType === 'ComboStore') {
|
||||
if (this.model.unique && form.parentStore && form.parentStore.storeType === ComboStore.name) {
|
||||
const combo = form.parentStore as IComboStore;
|
||||
const group = combo.uniques.get(this.model.name) as IUniqueGroup;
|
||||
group && group.items.forEach(item => item.validate());
|
||||
group.items.forEach(item => item.validate());
|
||||
} else {
|
||||
this.model.validate(this.hook);
|
||||
form.getItemsByName(this.model.name)
|
||||
|
|
Loading…
Reference in New Issue