Fixes All Popups Signals
This commit is contained in:
@@ -104,6 +104,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||||||
public closeDropdown(): void {
|
public closeDropdown(): void {
|
||||||
this.profileDropdownState = false;
|
this.profileDropdownState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public loginPopupStateChange(state: boolean): void {
|
public loginPopupStateChange(state: boolean): void {
|
||||||
if (state) {
|
if (state) {
|
||||||
this.createLoginPopup();
|
this.createLoginPopup();
|
||||||
@@ -186,6 +187,12 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||||||
this.myProfileComponent.instance.state = true;
|
this.myProfileComponent.instance.state = true;
|
||||||
this.myProfileComponent.instance.user = this.loggedUser;
|
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) => {
|
this.myProfileComponent.instance.stateChange.subscribe((state) => {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
this.closeMyProfilePopup();
|
this.closeMyProfilePopup();
|
||||||
@@ -202,6 +209,12 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||||||
this.viewContainerRef.createComponent(HelpComponent);
|
this.viewContainerRef.createComponent(HelpComponent);
|
||||||
this.helpComponent.instance.state = true;
|
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) => {
|
this.helpComponent.instance.stateChange.subscribe((state) => {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
this.closeHelpPopup();
|
this.closeHelpPopup();
|
||||||
|
|||||||
Reference in New Issue
Block a user