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

contextMenuService not showing the menus in angular 11 #237

Open
bala-visolve opened this issue Sep 17, 2021 · 4 comments
Open

contextMenuService not showing the menus in angular 11 #237

bala-visolve opened this issue Sep 17, 2021 · 4 comments

Comments

@bala-visolve
Copy link

bala-visolve commented Sep 17, 2021

I have updated my application from angular 8 to 11.

ngx-contextmenu is not showing the menu through,contextMenuService .

this.contextMenuService.show.next({

I have updated the packages version to recent also but still context menu is not showing up.

Any help would be really appreciated!!

Angular: 11
CDK/Material: ngx-contextmenu@6.0.0
Browser(s): Chrome and firefox
Operating System ( Ubuntu):

@rrauenza
Copy link

rrauenza commented Sep 21, 2021

This and #236 seem to be related to https://stackoverflow.com/questions/60432992/expression-has-changed-after-it-was-checked-using-viewchild-reference

I haven’t been able to reproduce outside of our app, but it seems to be related to detect changes not detecting changes as well as possibly a similar error message mentioned in the SO link.

when it works, the menu shows after ngx contextmenu calls contextMenuContent.changeDetectorRef.detectChanges() and when it doesn’t, this call seems to do nothing.

@rrauenza
Copy link

This and #236 seem to be related to https://stackoverflow.com/questions/60432992/expression-has-changed-after-it-was-checked-using-viewchild-reference

No, doing ViewChild with static=true seems to fix the error message, but not the menu coming up.

@rrauenza
Copy link

We were using too old a version of angular material. Upgrade fixed it.

@chitgoks
Copy link

chitgoks commented Aug 8, 2023

what version did you used for angular 11?

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

3 participants