Skip to content

Empty value in <select> option is not displayed #530

Closed
@Roland-Gornisiewicz

Description

@Roland-Gornisiewicz

Summary

Empty value in "select" option is not displayed

Steps to Reproduce

When using a element, an option with an empty value attribute (e.g., value="") does not appear in the dropdown list. This behavior prevents the display of a placeholder or "empty" option when needed. Steps to Reproduce Create a element with an option containing an empty value:

<select data-hs-select='{[..]}' class="hidden">
  <option value="">Empty option</option>
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
</select>
  1. Open the dropdown in the browser.

  2. Observe that the option with value="" is either missing or not visible.

you can also see it in the documentation:
https://preline.co/docs/advanced-select.html#basic-usage
e.g: section: Basic usage

How can I allow this option to be displayed?

Demo Link

https://preline.co/docs/advanced-select.html#basic-usage

Expected Behavior

No response

Actual Behavior

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions