primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Dropdown and Multiselect controls that are bound always have ui-inputwrapper-filled class

Open dcanning opened this issue 6 years ago • 1 comments

[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

Even when no value is set on the form control or model property the bound multiselect or dropdown always has the ui-inputwrapper-filled class assigned to it. Unbound don't have this issue. Behavior in version 9 is better, p-multiSelect works in all cases, but p-dropdown does not work when bound.

Plunkr Case (Bug Reports) Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

primeng 8 https://stackblitz.com/edit/angular-sqwwqk

primeng 9 https://stackblitz.com/edit/github-ujd4uy

Current behavior binding a p-dropdown or p-multiSelect in any way causes them to always have the ui-inputwrapper-filled class. This makes it difficult to property utilize the ui-float-label class for these controls.

Expected behavior When no value is assigned to the formcontrol or the bound property the control in question should not have ui-inputwrapper-filled

Minimal reproduction of the problem with instructions inspect the p-dropdown and p-multiselect controls in the plunkr provided and see that they always have ui-inputwrapper-filled class What is the motivation / use case for changing the behavior? need classes to be properly assigned to correctly use ui-float-label

Please tell us about your environment: windows 10, node 10.16.3

  • Angular version: 5.X 8 and 9

  • PrimeNG version: 5.X 8 and 9

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] chrome 80 firefox 73

dcanning avatar Feb 20 '20 21:02 dcanning

You need to use placeholder instead of dummy options like {label:'Select City', value:null}.

cagataycivici avatar Mar 28 '20 08:03 cagataycivici