mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Fixed issue with dynamic group component
This commit is contained in:
@@ -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