Describe the bug
I am trying to create a dynamic context menu component who receives the list of context menu actions. For this purpose I am using the wrapper by delegating its behavior over ContextMenuService, however the previously opened menus are not closed.
Another strange behavior I notice is the fact that the context menu value is not properly refreshed. The previous value is passed within the visible and disabled context menu operations.
Your help could be very appreciated.
To Reproduce
Steps to reproduce the behavior:
- Go to 'https://stackblitz.com/~/github.com/lazaro3487/angular-context-menu'
- Right click on the table cells. The previous context menu is not closed.
- On the browser developer tools the value for visible and disabled functions are logged, to see the problem.
Stackblitz Example
https://stackblitz.com/~/github.com/lazaro3487/angular-context-menu