[SYNC]
This commit is contained in:
@@ -336,13 +336,13 @@ class AstromicFormController extends FormController {
|
||||
// Recursively handle subgroups
|
||||
if (groupStructure.subGroups != null && groupStructure.subGroups!.isNotEmpty) {
|
||||
for (final (FormGroupStructure subGroup, int subgroupInitialCount) in groupStructure.subGroups!) {
|
||||
final String nestedPrefix = parentPrefix.isEmpty
|
||||
? standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id) // If no parentPrefix, use the group directly
|
||||
: '$parentPrefix->${standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id)}'; // Add to parentPrefix
|
||||
final String subgroupPrefix = parentPrefix.isEmpty
|
||||
? standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id)
|
||||
: '$parentPrefix->${standeredGroupFormat(groupStructure.id, groupIndex, subGroup.id)}'; // Add to parentPrefix only once
|
||||
|
||||
// Initialize subgroup controllers recursively
|
||||
for (int subIndex = 0; subIndex < subgroupInitialCount; subIndex++) {
|
||||
_initializeGroupControllers(subGroup, subgroupInitialCount, parentPrefix: nestedPrefix);
|
||||
_initializeGroupControllers(subGroup, subgroupInitialCount, parentPrefix: subgroupPrefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,6 +362,7 @@ class AstromicFormController extends FormController {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// void initializeFormGroup(FormGroupStructure groupStructure, {int initialCount = 1}) {
|
||||
// assert(groupStructure.fields.isNotEmpty, '$groupStructure: Group Fields should NOT be empty.');
|
||||
// if (groupStructure.subGroups != null && groupStructure.subGroups!.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user