mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Do not pass value and control down
This commit is contained in:
parent
97c26e23c8
commit
98ddbff044
1 changed files with 4 additions and 2 deletions
|
@ -63,7 +63,9 @@ class FormNested extends PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { value, ...rest } = this.props;
|
||||
// do not pass FormNested's own value and control props down
|
||||
const properties = _.omit(this.props, 'value', 'control');
|
||||
|
||||
return (
|
||||
<div className="form-group row form-nested">
|
||||
<label className="control-label col-sm-3">{this.props.label}</label>
|
||||
|
@ -73,7 +75,7 @@ class FormNested extends PureComponent {
|
|||
(subDocument, i) =>
|
||||
!this.isDeleted(i) && (
|
||||
<FormNestedItem
|
||||
{...rest}
|
||||
{...properties}
|
||||
key={i}
|
||||
itemIndex={i}
|
||||
path={`${this.props.path}.${i}`}
|
||||
|
|
Loading…
Add table
Reference in a new issue