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
Crash on expressionProperties if 'templateOptions.options' stream source is a subject #2922
Comments
Have you tried returning
new Subject().asObservable()?
…On Fri, Jul 9, 2021, 12:33 PM Greegko ***@***.***> wrote:
*Description*
For templateOptions.options!
When the observable is interval or from works perfectly, but when we
adjust to Subject or BehaviourSubject it crashes, because the
JSON.stringify crashes on circular references.
Super short crashing snippet:
expressionProperties: {
'templateOptions.options': modal => new Subject()
}
When we target other templateOptions like templateOptions.label it is
working fine.
*Minimal Reproduction*
https://stackblitz.com/edit/ngx-formly-observable-options-crash
- Angular version: stackblitz with 9.x, we use 11.x
- Formly version: 5.10.21
Find it a nice way to recreate the observable when the target module path
value is changing, therefore we would like to use with difference sources
and map / filter based on the model actual values.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2922>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADB4XNMVE6P6W3JOM3KGSVTTW4XFBANCNFSM5ADFGLTA>
.
|
Sure I am not using pure Subject in general, we are always doing some operations, therefore pipe would create an observable anyway, but even with |
This issue has been fixed and released as part of v5.10.22 release. Please let us know, in case you are still encountering a similar issue/problem. |
Description
For
templateOptions.options
!When the observable is
interval
orfrom
works perfectly, but when we adjust toSubject
orBehaviourSubject
it crashes, because theJSON.stringify
crashes on circular references.Super short crashing snippet:
When we target other
templateOptions
liketemplateOptions.label
it is working fine.Minimal Reproduction
https://stackblitz.com/edit/ngx-formly-observable-options-crash
Find it a nice way to recreate the observable when the target module path value is changing, therefore we would like to use with difference sources and map / filter based on the model actual values.
The text was updated successfully, but these errors were encountered: