Skip to content

Option: empty value string is ignored #11736

@Lukas742

Description

@Lukas742

Bug Description

When setting the value attribute of an ui5-option to an empty string (value=""), the value is ignored in the FormData and the text content of the option is used.

Related issue (raised by SAP SF): SAP/ui5-webcomponents-react#7435

Affected Component

No response

Expected Behaviour

When submitting a form with a selected Option with value="", the submitted value should also be an empty string - just like it is with a native select.

Isolated Example

https://stackblitz.com/edit/github-vuffi5ue?file=src%2FApp.tsx

Steps to Reproduce

  1. Go to StackBlitz
  2. Select the "Empty" option in both selects
  3. Submit the form
  4. See console.log

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.11.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SAP SF

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Labels

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions