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

p-popover: Show close icon #17176

Closed
1 of 4 tasks
framework-res opened this issue Dec 22, 2024 · 2 comments
Closed
1 of 4 tasks

p-popover: Show close icon #17176

framework-res opened this issue Dec 22, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@framework-res
Copy link

Describe the bug

p-popover #op [showCloseIcon]="true"
showCloseIcon seem isn't working

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/mvjlrclu?file=package.json,src%2Fapp%2Fimports.ts,src%2Fapp%2Fpopover-basic-demo.html

Environment


Angular version

18.2.12

PrimeNG version

v18 (LTS Only)

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Click button toggle

Expected behavior

Pop over will be open but without old prime ng close icon

@framework-res framework-res added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 22, 2024
@el7lme
Copy link

el7lme commented Dec 22, 2024

I have the same issue in ver 19.0.1

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 23, 2024
@mertsincan mertsincan added this to the 19.0.2 milestone Dec 23, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 23, 2024
@mertsincan mertsincan added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Dec 23, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Discussion Issue or pull request needs to be discussed by Core Team labels Dec 23, 2024
@cetincakiroglu cetincakiroglu self-assigned this Dec 23, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeNG Dec 23, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Thanks for reporting the issue, it seems that there is a typo leftover from component rework, showCloseIcon is not used anywhere in the component, and the component doesn't have a button with close functionality at all. The proper solution to pass close function by closeCallback context variable with content template.

Correct use:

<p-popover ....>
    <ng-template #content let-closeCallback="closeCallback">
      <button (click)="closeCallback($event)">Close</button>
    </ng-template>
</p-popover>

@cetincakiroglu cetincakiroglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Dec 23, 2024
@egorbwork egorbwork mentioned this issue Jan 5, 2025
4 tasks
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
Status: Done
Development

No branches or pull requests

4 participants