primeng icon indicating copy to clipboard operation
primeng copied to clipboard

10.0.0 Dropdown & MultiSelect with formControlName gets touched when *ngIf hide/show

Open alexrponce opened this issue 6 years ago • 2 comments

[ x ] bug report => Search github for a similar issue or PR before submitting

Plunkr Case (Bug Reports) https://stackblitz.com/edit/github-fxugfy-2rczqi?file=src/app/app.component.ts

Current behavior Using dropdown and multiSelect with formControlName, components gets touched when *ngIf hides and shows them

Expected behavior That they are not touched when they hide and show with *ngIf using formControlName

What is the motivation / use case for changing the behavior? Be able to work with reactive forms

Please tell us about your environment: Windows 10

  • Angular version: Angular 10.0.14

  • PrimeNG version: Primeng 10.0.0

  • Browser: [ Chrome 85.0.4183.102 (Build oficial) (64 bits) ]

alexrponce avatar Sep 22 '20 18:09 alexrponce

UPDATE

For the moment, to avoid this behavior I have commented the following lines:

Lines 1025 - 1028. ngOnDestroy() { this.restoreOverlayAppend(); this.onOverlayHide(); }

In node_modules\primeng\__ivy_ngcc__\fesm2015\primeng-dropdown.js

alexrponce avatar Sep 22 '20 20:09 alexrponce

Hi,

We couldn't replicate the issue with the latest PrimeNG (v13). If the issue still exists with the latest PrimeNG version, please provide a StackBlitz example by using PrimeNG Issue Template and re-open the issue.

Regards

cetincakiroglu avatar Mar 28 '22 13:03 cetincakiroglu