mirror of
https://github.com/zhigang1992/react-jsonschema-form.git
synced 2026-05-27 09:03:48 +08:00
Merge branch 'error-schema-array' of git://github.com/knilink/react-jsonschema-form into knilink-error-schema-array
This commit is contained in:
@@ -50,9 +50,16 @@ class ObjectField extends Component {
|
||||
}
|
||||
|
||||
onPropertyChange = name => {
|
||||
return (value, options) => {
|
||||
return (value, errorSchema) => {
|
||||
const newFormData = { ...this.props.formData, [name]: value };
|
||||
this.props.onChange(newFormData, options);
|
||||
this.props.onChange(
|
||||
newFormData,
|
||||
errorSchema &&
|
||||
this.props.errorSchema && {
|
||||
...this.props.errorSchema,
|
||||
[name]: errorSchema,
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user