Fixes All Popups Signals

This commit is contained in:
2023-10-23 04:01:34 -03:00
parent 57d228c726
commit 0f4336c994

View File

@@ -104,6 +104,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
public closeDropdown(): void {
this.profileDropdownState = false;
}
public loginPopupStateChange(state: boolean): void {
if (state) {
this.createLoginPopup();
@@ -186,6 +187,12 @@ export class HeaderComponent implements OnInit, OnDestroy {
this.myProfileComponent.instance.state = true;
this.myProfileComponent.instance.user = this.loggedUser;
this.myProfileComponent.instance.ignoreClickOutside = [
this.profileBtnElementRef,
this.profileDropdownElementRef,
this.userElementRef,
].map((element) => element.nativeElement);
this.myProfileComponent.instance.stateChange.subscribe((state) => {
if (!state) {
this.closeMyProfilePopup();
@@ -202,6 +209,12 @@ export class HeaderComponent implements OnInit, OnDestroy {
this.viewContainerRef.createComponent(HelpComponent);
this.helpComponent.instance.state = true;
this.helpComponent.instance.ignoreClickOutside = [
this.profileBtnElementRef,
this.profileDropdownElementRef,
this.userElementRef,
].map((element) => element.nativeElement);
this.helpComponent.instance.stateChange.subscribe((state) => {
if (!state) {
this.closeHelpPopup();