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

p-dropdown with editable=true and floating labels results in incorrect behavior with manually entered values #10170

Closed
nicholas-ochoa opened this issue Apr 27, 2021 · 0 comments
Assignees
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

Comments

@nicholas-ochoa
Copy link
Contributor

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

Current behavior
When adding the [editable]="true" property to the component and using float labels, the p-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

image

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 the p-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

@yigitfindikli yigitfindikli self-assigned this Apr 28, 2021
@yigitfindikli yigitfindikli added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Apr 28, 2021
@yigitfindikli yigitfindikli added this to the 11.4.1 milestone Apr 28, 2021
@yigitfindikli yigitfindikli added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Apr 28, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.1.2 Fixed in PrimeNG LTS 10.1.2 LTS-FIXED-9.2.8 Fixed in PrimeNG LTS 9.2.8 and removed LTS-PORTABLE labels May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants