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

Dialog/OverlayPanel onHide triggered when destroying an hidden dialog #6442

Closed
Silentscripter opened this issue Sep 3, 2018 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Silentscripter
Copy link

I'm submitting a ... (check one with "x")

[X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)

https://angular-3fwuct.stackblitz.io

Current behavior
The onHide event in p-dialog is always triggered when the p-dialog component is destroyed, whether the dialog is opened or not.

Expected behavior
The onHide event should trigger only when an open dialog is closed or destroyed. This was working normally in primeng v.5

Minimal reproduction of the problem with instructions

  1. Add a p-dialog with an onHide callback associated.
  2. Destroy the dialog container, whether by ngIf or by routing to another page
  3. You should notice that the callback is executed even if the dialog has never been opened.
    https://angular-3fwuct.stackblitz.io

Please tell us about your environment:
Windows 10 x64

  • Angular version: 6.1.4

  • PrimeNG version: 6.1.3

  • **Browser:**all

@cagataycivici cagataycivici changed the title p-dialog onHide triggered when destroying an hidden dialog Dialog/OverlayPanel onHide triggered when destroying an hidden dialog Sep 18, 2018
@cagataycivici cagataycivici self-assigned this Sep 18, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 18, 2018
@cagataycivici cagataycivici added this to the 6.1.4 milestone Sep 18, 2018
@cagataycivici
Copy link
Member

PR merged, thank you.

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

No branches or pull requests

2 participants