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

Dropdown stays with red border after form reset #11503

Closed
marcioggs opened this issue May 11, 2022 · 5 comments · Fixed by #11545
Closed

Dropdown stays with red border after form reset #11503

marcioggs opened this issue May 11, 2022 · 5 comments · Fixed by #11545
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@marcioggs
Copy link

marcioggs commented May 11, 2022

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)
Broken on PrimeNG 13.4.0 with Angular 13.3.6: https://stackblitz.com/edit/primeng-dropdown-demo-bcgj5v?file=src/app/app.component.html
Same code working on PrimeNG 13.3.3 with Angular 13.3.6: https://stackblitz.com/edit/primeng-dropdown-demo-trx91m?file=src/app/app.component.html

Current behavior
The dropdown component on a reactive form stays invalid (with a red border and containing class ng-dirty) after the form is reset.

image

Expected behavior
The red border should disappear after the form is resetted, class ng-dirty should be replaced by ng-pristine..

Minimal reproduction of the problem with instructions

  1. Select a city on the dropdown;
  2. Click on the "Reset" button;
  3. Verify that the dropdown became invalid with the red border.
  • Angular version: 13.3.6
  • PrimeNG version: 13.4.0
  • Browser: all
@marcioggs
Copy link
Author

marcioggs commented May 11, 2022

After some more tests the issue stopped reproducing (maybe StackBlitz cache).
I'll continue investigating to check if there's something wrong with it.

@marcioggs marcioggs changed the title Dropdown stays invalid after form reset (bug introduced at 13.4.0) Dropdown stays invalid after form reset May 11, 2022
@marcioggs marcioggs changed the title Dropdown stays invalid after form reset Dropdown stays with red border after form reset May 11, 2022
@marcioggs marcioggs reopened this May 11, 2022
volvachev pushed a commit to volvachev/primeng that referenced this issue May 11, 2022
volvachev added a commit to volvachev/primeng that referenced this issue May 11, 2022
@cetincakiroglu cetincakiroglu self-assigned this May 12, 2022
@sergeypayu
Copy link
Contributor

Have the same issue. After updating to 13.4.1

@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented May 23, 2022

Have the same issue. After updating to 13.4.1

Hi,

Will be fixed in the next release.

Regards

@sergeypayu
Copy link
Contributor

By major you mean 14? That would be unfortunate, because it's a regression that won't allow us to update primeng to 13.4.1 in production. We will be forced to stay on 13.3.3 until this is fixed

@cetincakiroglu cetincakiroglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 23, 2022
@cetincakiroglu cetincakiroglu added this to the 13.Future milestone May 23, 2022
@cetincakiroglu
Copy link
Contributor

Hi,

Sorry for typo

Regards

@cetincakiroglu cetincakiroglu modified the milestones: 13.Future, 13.4.2 May 24, 2022
cetincakiroglu added a commit that referenced this issue Jun 6, 2022
Fixed #11503 - Dropdown | red border stays after form reset
@cetincakiroglu cetincakiroglu removed their assignment Jun 7, 2022
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
3 participants