Fixes All Popups Signals
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user