[SYNC]
This commit is contained in:
@@ -275,6 +275,7 @@ class AstromicFormController extends FormController {
|
|||||||
if (groupStructure.values != null && groupStructure.values!.isNotEmpty) {
|
if (groupStructure.values != null && groupStructure.values!.isNotEmpty) {
|
||||||
for (String valueID in groupStructure.values!) {
|
for (String valueID in groupStructure.values!) {
|
||||||
removeController('${groupStructure.id}-#$indexToRemove-$valueID');
|
removeController('${groupStructure.id}-#$indexToRemove-$valueID');
|
||||||
|
_hostedValues.remove('${groupStructure.id}-#$indexToRemove-$valueID');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -286,11 +287,16 @@ class AstromicFormController extends FormController {
|
|||||||
}
|
}
|
||||||
if (groupStructure.values != null && groupStructure.values!.isNotEmpty) {
|
if (groupStructure.values != null && groupStructure.values!.isNotEmpty) {
|
||||||
for (String valueID in groupStructure.values!) {
|
for (String valueID in groupStructure.values!) {
|
||||||
|
_hostedValues.remove('${groupStructure.id}-#$indexToRemove-$valueID');
|
||||||
set('${groupStructure.id}-#$indexToRemove-$valueID', value('${groupStructure.id}-#$nextIndex-$valueID'));
|
set('${groupStructure.id}-#$indexToRemove-$valueID', value('${groupStructure.id}-#$nextIndex-$valueID'));
|
||||||
|
setValue('${groupStructure.id}-#$indexToRemove-$valueID', getValue('${groupStructure.id}-#$nextIndex-$valueID'));
|
||||||
removeController('${groupStructure.id}-#$nextIndex-$valueID');
|
removeController('${groupStructure.id}-#$nextIndex-$valueID');
|
||||||
|
_hostedValues.remove('${groupStructure.id}-#$nextIndex-$valueID');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Remove last instance
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ class _FormGroupWrapperState extends State<FormGroupWrapper> {
|
|||||||
void _removeItem(int i) {
|
void _removeItem(int i) {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.formController.removeInstanceFromFormGroup(widget.groupID, i);
|
widget.formController.removeInstanceFromFormGroup(widget.groupID, i);
|
||||||
|
instances = widget.formController.getFormGroupValue(widget.groupID)!.instances;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user