[CST-3782] Fix issue with dispatchOperationsFromRemoveEvent method

This commit is contained in:
Giuseppe Digilio
2021-02-18 09:58:06 +01:00
parent 1901ace5a6
commit 42636c6f95
2 changed files with 7 additions and 6 deletions

View File

@@ -285,9 +285,10 @@ export class SectionFormOperationsService {
previousValue: FormFieldPreviousValueObject): void {
const path = this.getFieldPathFromEvent(event);
const value = this.getFieldValueFromChangeEvent(event);
console.log(value);
if (this.formBuilder.isQualdropGroup(event.model as DynamicFormControlModel)) {
this.dispatchOperationsFromMap(this.getQualdropValueMap(event), pathCombiner, event, previousValue);
} else if (isNotEmpty(value) && (value instanceof FormFieldMetadataValueObject && value.hasValue())) {
} else if ((isNotEmpty(value) && typeof value === 'string') || (isNotEmpty(value) && value instanceof FormFieldMetadataValueObject && value.hasValue())) {
this.operationsBuilder.remove(pathCombiner.getPath(path));
}
}