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

Change detection for visible attribute #216

Open
schill32 opened this issue Sep 22, 2020 · 4 comments
Open

Change detection for visible attribute #216

schill32 opened this issue Sep 22, 2020 · 4 comments

Comments

@schill32
Copy link

schill32 commented Sep 22, 2020

I have a span that has a context menu enclosed. When the (contextmenu) event fires, the code will run and set some class variables which are then used in the ng-template. Below is a small example of this...

<span [contextMenu]="myContextMenu" (contextmenu)="handleMenu($event)">
<context-menu #myContextMenu>
<ng-template
            contextMenuItem
            [visible]="
              this.createMenuOptionVisible

What I'm seeing is that when my event handler for the context menu event is fired, the variable is set to true and thus the context menu item should be displayed. What I am seeing however is that is only happens the second time the span is right-clicked. The initial right-click, even though the variable is getting set to true, the item is still not being displayed. Is there something that I'm missing?

@lunar-consultancy
Copy link

I'm having the same issue

@andy008
Copy link

andy008 commented Jun 12, 2021

I'm also having this issue.

@AmirSavand
Copy link

Same issue.

@AmerAnsari
Copy link

AmerAnsari commented Jun 22, 2021

Same issue.

But the only solvation is to disable it with some variable.

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

No branches or pull requests

5 participants