ngx-contextmenu
ngx-contextmenu copied to clipboard
Change detection for visible attribute
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?
I'm having the same issue
I'm also having this issue.
Same issue.
Same issue.
But the only solvation is to disable it with some variable.