Merge branch 'Development' of code-repo.d4science.org:MaDgiK-CITE/argos into Development

This commit is contained in:
argirok 2022-02-04 15:33:31 +02:00
commit 93cb1fd1a7
1 changed files with 3 additions and 10 deletions

View File

@ -231,18 +231,11 @@ export class VisibilityRulesService {
private resetFieldFormGroup(formGroup: FormGroup) {
const renderStyle = formGroup.getRawValue().viewStyle.renderStyle;
if (renderStyle === DatasetProfileFieldViewStyle.Validation || renderStyle === DatasetProfileFieldViewStyle.DatasetIdentifier) {
const value = { identifier: '', type: '' };
if (formGroup.get('value').value != value) {
formGroup.get('value').setValue(value, { emitEvent: false });
this.updateValueAndVisibility(formGroup.get('id').value, value);
}
formGroup.get('value').setValue({ identifier: '', type: '' });
} else {
const value = formGroup.get('defaultValue').value ? this.parseValue(formGroup.get('defaultValue').value.value) : undefined;
if (formGroup.get('value').value != value) {
formGroup.get('value').setValue(value, { emitEvent: false });
this.updateValueAndVisibility(formGroup.get('id').value, value);
}
formGroup.get('value').setValue(formGroup.get('defaultValue').value ? this.parseValue(formGroup.get('defaultValue').value.value) : undefined);
}
}
private resetCompositeFieldFormGroup(formGroup: FormGroup) {