mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Ignore path specifiers if root node is given
This commit is contained in:
parent
e763eba370
commit
1ab07269d2
1 changed files with 5 additions and 2 deletions
|
@ -490,12 +490,15 @@ class SmartForm extends Component {
|
|||
field.nestedSchema = fieldSchema.schema;
|
||||
field.nestedInput = true;
|
||||
|
||||
// get all children by path (if any)
|
||||
const children = this.getChildFields(fieldName);
|
||||
|
||||
// get nested schema
|
||||
// for each nested field, get field object by calling createField recursively
|
||||
field.nestedFields = this.getFieldNames({
|
||||
schema: field.nestedSchema,
|
||||
fields: this.getChildFields(fieldName) || '*'
|
||||
}).map(subFieldName => {
|
||||
fields: (this.props.fields.includes(fieldName) || !children) ? '*' : children
|
||||
}).map(subFieldName => {
|
||||
return this.createField(
|
||||
subFieldName,
|
||||
field.nestedSchema,
|
||||
|
|
Loading…
Add table
Reference in a new issue