p-dropdown with editable=true and floating labels results in incorrect behavior with manually entered values #10170
Labels
LTS-FIXED-9.2.8
Fixed in PrimeNG LTS 9.2.8
LTS-FIXED-10.1.2
Fixed in PrimeNG LTS 10.1.2
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Current behavior
When adding the
[editable]="true"
property to the component and using float labels, thep-inputwrapper-filled
class is not added to the<p-dropdown>
element when a value is typed in and not selected from the drop down list of values. When selecting from the drop down,p-inputwrapper-filled
is added to the<p-dropdown>
element. This causes the floating label to consider the field "empty" and the label expands and occupies the same space as the field value.Reproduction on stackblitz: https://stackblitz.com/edit/github-sijlth-evusyx?file=src/app/app.component.html
Expected behavior
<p-dropdown>
with[editable]="true"
should behave the same when manually typing a value as when selecting a value from the drop down list with regards to the addition / removal of thep-inputwrapper-filled
class on the<p-dropdown>
element.What is the motivation / use case for changing the behavior?
The component does not work as expected when
[editable]
is enabled.Please tell us about your environment:
Angular version: 11.2.10
PrimeNG version: 11.4.0
Browser: Chrome 90
Language: TS 4.2.4
The text was updated successfully, but these errors were encountered: