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 position error with sidebar when sidebar pop at page bottom #16530

Open
moJiXiang opened this issue Oct 12, 2024 · 3 comments
Open
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@moJiXiang
Copy link

Describe the bug

ContextMenu poisition will not append to list item, when sidebar popup from page bottom, look at demo below.

https://stackblitz.com/edit/274pnq?file=src%2Fapp%2Fsidebar-basic-demo.html,src%2Fapp%2Fsidebar-basic-demo.ts

Environment

https://stackblitz.com/edit/274pnq?file=src%2Fapp%2Fsidebar-basic-demo.html,src%2Fapp%2Fsidebar-basic-demo.ts

Reproducer

No response

Angular version

^18.0.1

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

22.0.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@moJiXiang moJiXiang added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 12, 2024
@wS2Zth
Copy link
Contributor

wS2Zth commented Oct 12, 2024

<div class="card flex justify-content-center">
  <p-sidebar
    ...
  </p-sidebar>

  <p-contextMenu #cm [model]="items">
    ...
  </p-contextMenu>

  <p-button (onClick)="sidebarVisible = true" icon="pi pi-arrow-right" />
</div>

image

@moJiXiang
Copy link
Author

<div class="card flex justify-content-center">
  <p-sidebar
    ...
  </p-sidebar>

  <p-contextMenu #cm [model]="items">
    ...
  </p-contextMenu>

  <p-button (onClick)="sidebarVisible = true" icon="pi pi-arrow-right" />
</div>

image

OK, It's a way resolve my problem. But if I want use a component with contextMenu in sidebar, the bug still exist. Like this code:

// main.component.html
<p-sidebar>
   <sub-component></sub-component>
</p-sidebar>

// sub-component.component.html
<ul *ngFor="let i of items; let i = $index">
  <li (contextmenu)="showContextMenu()">{{i}}</li>
</ul>
<p-contextMenu [items]="menus"></p-contextMenu>

@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 19, 2024
@mertsincan mertsincan added this to the Future milestone Nov 19, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

3 participants