Skip to content
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

Multiple disabledWhile on same formGroup #112

Closed
strigefleur opened this issue Oct 20, 2021 · 4 comments
Closed

Multiple disabledWhile on same formGroup #112

strigefleur opened this issue Oct 20, 2021 · 4 comments
Labels
question Further information is requested

Comments

@strigefleur
Copy link

Is this a regression?

No

Description

There are two different conditions to apply on a form: disable it whole and disable a certain control.
Thus, I use form.disabledWhile(conditionFoo$) and then form.control.foo.disabledWhile(conditionBar$).

It appears that conditionFoo$ emit overwrites any existing control conditions so that if conditionBar$ doesn't emit right after the conditionFoo$ emit the control never gets correctly disabled/enabled.
Is it intended?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

No response

Do you want to create a pull request?

No

@NetanelBasal
Copy link
Member

It's not clear to me what the issue is. Try reproducing it on codesandbox or stackblitz.

@NetanelBasal NetanelBasal added the question Further information is requested label Oct 21, 2021
@strigefleur
Copy link
Author

Here you are

@NetanelBasal
Copy link
Member

NetanelBasal commented Oct 21, 2021

In this case, we're just passing the result of the observable to Angular. Check if the behavior is the same when using plain Angular.

@strigefleur
Copy link
Author

I guess so, that's why I asked if this was intended.
I'll stick to combineLatest then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants