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

correct a funky observable input #1707

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

danoswaltCL
Copy link
Collaborator

also erased a spot where asObservable not was needed, BehaviorSubjects are already observables

@@ -5,7 +5,7 @@
[cancelBtnLabel]="data.cancelBtnLabel"
[primaryActionBtnLabel]="data.primaryActionBtnLabel"
[primaryActionBtnColor]="data.primaryActionBtnColor"
[primaryActionBtnDisabled$]="isDeleteActionBtnDisabled$"
[primaryActionBtnDisabled$]="isDeleteActionBtnDisabled$ | async"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[primaryActionBtnDisabled] instead?

isDeleteNotTyped$: Observable<boolean> = this.inputSubject
.asObservable()
.pipe(map((value) => value.toLowerCase() !== 'delete'));
isDeleteNotTyped$: Observable<boolean> = this.inputSubject.pipe(map((value) => value.toLowerCase() !== 'delete'));
Copy link
Collaborator

@Yagnik56 Yagnik56 Jun 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has messed up something, isDeleteActionBtnDisabled is always false and I can delete the feature flag without typing anything.

@Yagnik56 Yagnik56 merged commit d99d051 into dev Jun 28, 2024
8 checks passed
@Yagnik56 Yagnik56 deleted the feature/fix-weird-observable-usage-in-common-modal branch June 28, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants