-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Edit child] The 'ЗБЕРЕГТИ' button stays enabled when mandatory 'По-батькові' field is empty #962 #974
Conversation
@@ -73,7 +73,7 @@ export class CreateChildComponent extends CreateFormComponent implements OnInit, | |||
this.ChildrenFormArray.valueChanges.pipe( | |||
takeUntil(this.destroy$), | |||
).subscribe((val: boolean) => { | |||
this.isEmpty = !Boolean(val[0].lastName) || !Boolean(val[0].firstName); | |||
this.isEmpty = !!!(val[0].lastName) || !!!(val[0].firstName) || !!!(val[0].middleName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!val[0].lastName
!val[0].firstName
!val[0].middleName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong typo? Why val is boolean but has lastName, firstName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should simplify is to !(val[0].lastName || val[0].firstName || val[0].middleName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you) Fixed it.
@@ -73,7 +73,7 @@ export class CreateChildComponent extends CreateFormComponent implements OnInit, | |||
this.ChildrenFormArray.valueChanges.pipe( | |||
takeUntil(this.destroy$), | |||
).subscribe((val: boolean) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change please typo
link this issue please (#965) |
[Edit child] The 'ЗБЕРЕГТИ' button stays enabled when mandatory 'По-батькові' field is empty #962