You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As l input values to my form I can see the SetValueActions dispatched with the redux dev tools, the action contains the correct value and array index id. but the state doesn't get updated
<form [ngrxFormState]="createCommandeForm">
// rest of the form ...
<div>
<div
*ngFor="
let arrayForm of createCommandeForm.controls.posts.value.value.controls;
let first = first;
let i = index
"
>
<div>
<span class="input-label">input*</span>
<sds-input
class="input"
type="date"
size="s"
ngDefaultControl
[ngrxFormControlState]="getFormControl(arrayForm).dateDebut"
></sds-input>
</div>
</form>
Component:
in my component I am using the following method to properly cast the controls returned from the formArray
getFormControl(control: FormState<CommandPoste>): FormGroupControls<CommandPoste> {
return (control as unknown as FormGroupState<CommandPoste>).controls;
}
Expected behavior
the state should be updated when the setValueAction is dispached
Screenshots
as i input a value in the form, the actions are correclty dispatched
but the state is still empty:
Library version:
8.0.0
The text was updated successfully, but these errors were encountered:
achraf-elk
changed the title
When using FormArrayState, the state doesn't update when SetValueAction is disptached
FormArrayState, the state doesn't update when SetValueActions are disptached
May 25, 2023
As l input values to my form I can see the SetValueActions dispatched with the redux dev tools, the action contains the correct value and array index id. but the state doesn't get updated
My setup
Reducer:
Template:
Component:
in my component I am using the following method to properly cast the controls returned from the formArray
Expected behavior
the state should be updated when the setValueAction is dispached
Screenshots
as i input a value in the form, the actions are correclty dispatched
but the state is still empty:
Library version:
8.0.0
The text was updated successfully, but these errors were encountered: