-
Notifications
You must be signed in to change notification settings - Fork 374
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
FormArray fields value updating #378
Comments
@garnikmkrtchyan Thanks for your message! After reading through your issue my conclusion is that adding additional information to the |
It will solve my problem partially. Even if I know which row I must replace, the valueUpdateing functionality doesn't work in this case. |
I think it would solve your problem as long as you avoid recreating the You've already figured out correctly how to update the value of a So if we extend the |
Thanks for your answer @udos86 . After creating a FormArray (that contain only one row), I call Initialize method to fill it from my dataset. All this work fine, row after row it create and fill my grid. But if I try later update some rows values by same mechanism, I get errors. From that errors I understand, that inner structure of FormArray was broken, and some references contain wrong (maybe old) values. That's all about this. Now my problem solved by another way, and I hope that you can provide a more simple mechanism to valueUpdating. |
@garnikmkrtchyan Ok! Nevertheless |
Hi
I have some problems when try to use FormArray functionality.
In each row I have 2 select boxes, and the options of second select box depends on first select box value.
I found the solution of this problem. After onChange() action in first select box I remove the appropriate row from arrayModel, change the createGroup method implementation and insert the row in old place. Now the problems.
(this.arrayModel.groups[rowNum].group[itemVal] as DynamicFormValueControlModel<string>).valueUpdates.next(array[+itemVal]);
When I try after this line of code recreate FormGroup and ArrayControl, like this:
this.formGroupGrid = this.formService.createFormGroup(this.formModelGrid); this.arrayControl = <FormArray> this.formGroupGrid.get(RlappConstants.gridName);
I get an error
I can give you plunker example upon your request.
P.S
Thanks for great library )
The text was updated successfully, but these errors were encountered: