Skip to content

fix(ui5-select): empty value string is ignored #11759

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix(ui5-select): empty value string is ignored #11759

wants to merge 1 commit into from

Conversation

tw4
Copy link
Contributor

@tw4 tw4 commented Jun 19, 2025

Description

This PR ensures that <ui5-option value=""> options with an empty string value are correctly handled during form submission in the ui5-select component.

fixed #11736

Details

  • Previously, options defined as <ui5-option value="">Empty</ui5-option> were not properly submitted with an empty string value.
  • With this fix, options with an explicit empty string ("") as their value are now correctly included in the submitted form data.

Expected Behavior

  • When the "Empty" option is selected, the submitted value should be an empty string ("").

  • The result in the console or form data should look like:

    { select2: "" }

Screenshot

        <form onSubmit={(e) => this.handleSubmit(e)}>
          <ui5-select name="select2">
            <ui5-option value="value">Value</ui5-option>
            <ui5-option value="">Empty</ui5-option>
            <ui5-option>No Value Attribute</ui5-option>
          </ui5-select>
          <button type="submit">Submit</button>
        </form>

image

@nnaydenow
Copy link
Contributor

Hi @dobrinyonkov , @PetyaMarkovaBogdanova,

Could you please take a look? Possible solution for: #11736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option: empty value string is ignored
2 participants