Fixed issue with concat component

This commit is contained in:
Giuseppe
2018-10-11 11:25:03 +02:00
parent 15315fda39
commit ae9d62d60d
3 changed files with 32 additions and 30 deletions

View File

@@ -277,13 +277,17 @@ export class FormBuilderService extends DynamicFormService {
}
getId(model: DynamicPathable): string {
let tempModel: DynamicFormControlModel;
if (this.isArrayGroup(model as DynamicFormControlModel)) {
return model.index.toString();
} else if (this.isModelInCustomGroup(model as DynamicFormControlModel)) {
tempModel = (model as any).parent;
} else {
return ((model as DynamicFormControlModel).id !== (model as DynamicFormControlModel).name) ?
(model as DynamicFormControlModel).name :
(model as DynamicFormControlModel).id;
tempModel = (model as any);
}
return (tempModel.id !== tempModel.name) ? tempModel.name : tempModel.id;
}
}