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
It would be great if formly would support observables on the hooksonInitafterViewInit and afterContentInit. If an observable is returned from one of the hooks, Formly would automatically subscribe to that observable until the field is destroyed. This would free users from subscribing to the observable and handling the onDestroy-hook themselves.
Example usage:
fields =[{
...
hooks: {// Patch value of some other form control every time this value changes// subscription and unsubscribe is handled by formly
onInit: field=>field.formControl.valueChanges.pipe(tap(value=>field.form.patchValue({someOtherField: value}))}},
...
];
The text was updated successfully, but these errors were encountered:
It would be great if formly would support observables on the
hooks
onInit
afterViewInit
andafterContentInit
. If an observable is returned from one of the hooks, Formly would automatically subscribe to that observable until the field is destroyed. This would free users from subscribing to the observable and handling theonDestroy
-hook themselves.Example usage:
The text was updated successfully, but these errors were encountered: