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 doesn't display empty string #1995

Closed
sid-6581 opened this issue Jan 15, 2022 · 2 comments
Closed

Dropdown doesn't display empty string #1995

sid-6581 opened this issue Jan 15, 2022 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Milestone

Comments

@sid-6581
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/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

Current behavior
When a dropdown list contains a string that is empty or all whitespace, two things happen:

  1. The dropdown list entry will be collapsed, and not the correct height.
  2. If a placeholder is provided, it will be displayed instead of the empty value.

Expected behavior
A blank value should be displayed instead of the placeholder, and the dropdown list should display the blank entry at the correct height.

  • Vue version: 3.2.26

  • PrimeVue version: 3.10

  • Browser: all

@tugcekucukoglu
Copy link
Member

Could you please add a codesandbox sample?

@sid-6581
Copy link
Contributor Author

Could you please add a codesandbox sample?

Here you go. This has two strings that causes problems. One is an empty string, one contains just whitespace. Both are not displayed with the correct height in the dropdown list, and both do not replace the placeholder.

Edit blazing-wildflower-ikc10

@tugcekucukoglu tugcekucukoglu changed the title Dropdown doesn't display empty string values properly Dropdown doesn't display empty string Jan 18, 2022
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 18, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.10.1 milestone Jan 18, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jan 18, 2022
tugcekucukoglu added a commit to tugcekucukoglu/primevue that referenced this issue Jan 18, 2022
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 vue2-portable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants