Skip to content

Commit

Permalink
fix: ensure group paths are properly registered on add
Browse files Browse the repository at this point in the history
Closes #1173
  • Loading branch information
Skaiir committed May 31, 2024
1 parent eaf03cc commit 64586ec
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/form-js-viewer/src/core/FieldFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,11 @@ export class FieldFactory {
this._enforceDefaultPath(field);
}

if (field.path) {
this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
isRepeatable: config.repeatable,
claimerId: field.id,
knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry),
});
}
this._pathRegistry.claimPath(this._pathRegistry.getValuePath(field), {
isRepeatable: config.repeatable,
claimerId: field.id,
knownAncestorIds: getAncestryList(_parent, this._formFieldRegistry),
});
}

return field;
Expand Down

0 comments on commit 64586ec

Please sign in to comment.