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: Selection is not working correctly with falsy values #3891

Closed
sean-dickinson opened this issue Apr 24, 2023 · 0 comments
Closed

Dropdown: Selection is not working correctly with falsy values #3891

sean-dickinson opened this issue Apr 24, 2023 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@sean-dickinson
Copy link
Contributor

Describe the bug

The dropdown component does not correctly apply the "filled" state class when the selected value is falsey. This means if you use a floating label with a falsey value, the label does not float when the value is selected.

Reproducer

https://codesandbox.io/s/vibrant-framework-1tnvq9?file=/src/App.vue

PrimeVue version

3.26.0

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a dropdown with an option that is a falsey value and a floating label
  2. Select the falsey value.
  3. Blur the input
  4. Watch the label cover the input.

Expected behavior

The "filled" state should work for falsey values.

@sean-dickinson sean-dickinson added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 24, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 2, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.28.0 milestone May 2, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this May 2, 2023
@tugcekucukoglu tugcekucukoglu changed the title Dropdown: Wrong styling when using falsey value Dropdown: Wrong styling when using falsy value May 2, 2023
@tugcekucukoglu tugcekucukoglu changed the title Dropdown: Wrong styling when using falsy value Dropdown: Selection is not working correctly with falsy values May 2, 2023
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
Development

No branches or pull requests

2 participants