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

ContextMenu: appentTo w/ template variable causes error when ContextMenu is destroyed #14793

Closed
adrikum opened this issue Feb 13, 2024 · 0 comments · Fixed by #14796
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@adrikum
Copy link
Contributor

adrikum commented Feb 13, 2024

Describe the bug

When using a ContextMenu with [appendTo]="templateVariable", an error occurs when it gets destroyed. The error does not occur if all existing ContextMenus are opened.

Using [appendTo]="'body'" works fine.

image

Environment

Any

Reproducer

https://stackblitz.com/edit/github-ms2ws4

Angular version

17.x

PrimeNG version

17.4.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

No response

Steps to reproduce the behavior

See stackblitz with instructions

Expected behavior

Removing ContextMenus should not cause an error.

@adrikum adrikum added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 13, 2024
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 16, 2024
@cetincakiroglu cetincakiroglu added this to the 17.8.0 milestone Feb 23, 2024
cetincakiroglu added a commit that referenced this issue Feb 23, 2024
Fix: #14793 check if containerViewChild exists before removing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants