Issue
- Firstly I create from with initial values.
- Then call API to fill the dropdown options.
- When page loaded I notice that all dropdown have red border and have ng-dirty class before any edit from UI.
Note: I tried to make form pristine using: makeAsPristine() but nothing change.
<p-dropdown _ngcontent-fxt-c428="" formcontrolname="costCenterId" optionvalue="id" class="p-element p-inputwrapper ng-tns-c200-4 ng-untouched ng-invalid ng-star-inserted ng-dirty">
call API to fill projectpaymentMethods list:
Solution
I encountered the same issue today and I could only solve it with css magic:
::ng-deep p-dropdown.ng-untouched.ng-invalid.ng-dirty {
.p-dropdown {
border-color: #ced4da;
}
}
I hope this helps.
Answered By - UmpiH
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.