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-autoComplete : onHide firing on destroy #11839

Closed
Elanor-L opened this issue Aug 18, 2022 · 0 comments
Closed

p-autoComplete : onHide firing on destroy #11839

Elanor-L opened this issue Aug 18, 2022 · 0 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Elanor-L
Copy link

Describe the bug

The onHide event is fired when the whole component is destroyed (e.g when the parent component is destroyed).

Environment

    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 14.1.0
Node: 16.14.0
Package Manager: npm 8.3.1
OS: win32 x64

Angular: 14.1.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1401.0
@angular-devkit/build-angular   14.1.0
@angular-devkit/core            14.1.0
@angular-devkit/schematics      14.1.0
@schematics/angular             14.1.0
rxjs                            7.4.0
typescript                      4.7.4

### Reproducer

https://stackblitz.com/edit/primeng-autocomplete-demo-elanor?file=src/app/app.component.css

### Angular version

14.1.0

### PrimeNG version

^14.0.1

### Build / Runtime

Angular CLI App

### Language

ALL

### Node version (for AoT issues node --version)

16.14.0

### Browser(s)

Chrome 104.0.5112.102

### Steps to reproduce the behavior

1. Click on the button to remove the component. If onHide is fired, it will be written

### Expected behavior

According to the documentation, the onHide event is supposed to be fired when overlay gets hidden (the exact opposite of onShow event I guess). So when the component is destroyed, if the overlay is already hidden, the event shouldn't be fired.
@Elanor-L Elanor-L added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 18, 2022
@cetincakiroglu cetincakiroglu added this to the 14.0.2 milestone Aug 24, 2022
cetincakiroglu added a commit that referenced this issue Aug 24, 2022
Fixed #11839 - AutoComplete | onHide event firing on destroy
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