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

AutoComplete: Primitive value 0 or reference value 0 does not display correctly #4749

Closed
jkocyigi opened this issue Nov 3, 2023 · 0 comments · Fixed by #4762
Closed

AutoComplete: Primitive value 0 or reference value 0 does not display correctly #4749

jkocyigi opened this issue Nov 3, 2023 · 0 comments · Fixed by #4762
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jkocyigi
Copy link

jkocyigi commented Nov 3, 2023

Describe the bug

Dropdown component does not display the correct label when either the selected option has a primitive value of 0 or a reference value of 0

Can also be reproduced on the PrimeVue website
https://primevue.org/autocomplete/

Same behavior applies to Dropdown component see:
#4748

Reproducer

https://codesandbox.io/p/sandbox/primevue-primitive-0-dropdown-forked-nd58jc?file=%2Fsrc%2FApp.vue%3A53%2C28

PrimeVue version

3.39.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Step 1: Have a AutoComplete with primitive values from 0 to 10
Step 2: Click open autocomplete suggestions
Step 3: Click option with value 0
Step 4: Option is not selected

image
image

Expected behavior

image

@jkocyigi jkocyigi added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 3, 2023
tugcekucukoglu added a commit that referenced this issue Nov 15, 2023
…lue-display

fix: #4749 || fix incorrect reference value display
@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 Nov 15, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.41.0 milestone Nov 15, 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

Successfully merging a pull request may close this issue.

2 participants