-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug :: arrayRef.splice is not a function #974
Comments
@stekontar Hi!
I'll add a bugfix for this but at the same time would like to strongly encourage you to not use ids multiple times as this can lead to unexpected behavior in general. |
@udos86 Imagine that I have an object that represents contact information. This object is the same for the Sender and the Recipient I could not change those models due to backend restiction. The result is that in DOM are creating inputs with the same ID. If you have any suggestions about that are welcome. Sample Model :
|
fixed in |
I'm submitting a
I'm using
Description
@udos86
I just have upgraded to version 8 from v7.0.1 and the following error appeared.
DynamicMaterialFormArrayComponent.html:10 ERROR TypeError: arrayRef.splice is not a function
at DynamicFormComponentService.registerFormControlRef (core.js:3321)
at DynamicMaterialFormControlContainerComponent.registerComponentRef (core.js:1622)
at DynamicMaterialFormControlContainerComponent.createFormControlComponent (core.js:1460)
at DynamicMaterialFormControlContainerComponent.ngOnChanges (core.js:1292)
based on my reasearch this is happening because the same model.id exists in more than one elements (formGroup/FormArray) despite that are placed in different level.
I understand that model.id should be unique in same level but in nested ones should be allowed.
The following MODEL reproduces the error.
Please pay attention on group_2000 that is repeated twice.
This is a critical issue as the same models can be reused many times in different levels or in the same level but directly nested to each other.
Regareds,
S.
The text was updated successfully, but these errors were encountered: