mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
Fixed issue with dynamic group component
This commit is contained in:
@@ -120,7 +120,7 @@ export class DsDynamicGroupComponent implements OnDestroy, OnInit {
|
||||
|| this.selectedChipItem.item[model.name].value === PLACEHOLDER_PARENT_METADATA)
|
||||
? null
|
||||
: this.selectedChipItem.item[model.name];
|
||||
model.valueUpdates.next(value);
|
||||
model.valueUpdates.next(this.formBuilderService.isInputModel(model) ? value.value : value);
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import { AbstractControl, FormGroup } from '@angular/forms';
|
||||
import {
|
||||
DYNAMIC_FORM_CONTROL_TYPE_ARRAY,
|
||||
DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP,
|
||||
DYNAMIC_FORM_CONTROL_TYPE_GROUP,
|
||||
DYNAMIC_FORM_CONTROL_TYPE_GROUP, DYNAMIC_FORM_CONTROL_TYPE_INPUT,
|
||||
DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP,
|
||||
DynamicFormArrayModel,
|
||||
DynamicFormControlModel,
|
||||
@@ -271,6 +271,10 @@ export class FormBuilderService extends DynamicFormService {
|
||||
return model.type === DYNAMIC_FORM_CONTROL_TYPE_ARRAY;
|
||||
}
|
||||
|
||||
isInputModel(model: DynamicFormControlModel): boolean {
|
||||
return model.type === DYNAMIC_FORM_CONTROL_TYPE_INPUT;
|
||||
}
|
||||
|
||||
getFormControlById(id: string, formGroup: FormGroup, groupModel: DynamicFormControlModel[], index = 0): AbstractControl {
|
||||
const fieldModel = this.findById(id, groupModel, index);
|
||||
return isNotEmpty(fieldModel) ? formGroup.get(this.getPath(fieldModel)) : null;
|
||||
|
Reference in New Issue
Block a user