Skip to content

ComboBox in form submits input value rather than selected key #1690

@LFDanLu

Description

@LFDanLu

🐛 Bug Report

Context: #1672

🤔 Expected Behavior

Not 100% sure but this is what I think might be correct:
ComboBox with allowCustomValue=false should probably submit its selected key on form submit. ComboBox with allowCustomValue=true should probably submit its input value on form submit if no selected key exists, otherwise submit its selected key.

EDIT: The above proposal has an issue since the user wouldn't be able to tell if it is a key or the input value being submitted

😯 Current Behavior

ComboBox always submits its input value on form submit

💁 Possible Solution

Possibly use HiddenSelect? Use something similar to HiddenSelect? Need to investigate

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
react-spectrum
Browser
Operating System

🧢 Your Company/Team

🕷 Tracking Issue (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions