Bug report
Current behavior
Only primitive string/number types are properly supported despite value being typed any. The Select.Root items prop and form value can't resolve the value or label from object value items.
Combobox has itemToLabel/String and itemToValue props to resolve the display and form submission value from the object value
Expected behavior
<Select.Item value={object}> should be properly supported
This reduces or prevents the need to map data to the conforming value/label format before rendering it
const items = [
{ id: 'test', name: 'Test' }
];
<Select.Root
defaultValue={items[0]}
items={items}
itemToLabel={(item) => item.name} {/* <Select.Value> */}
itemToValue={(item) => item.id} {/* hidden input value */}
>
[...] <Select.Item value={item}>
Base UI version
1.0.0-beta.2
Bug report
Current behavior
Only primitive
string/numbertypes are properly supported despitevaluebeing typedany. TheSelect.Rootitemsprop and form value can't resolve the value or label from object value items.Combobox has
itemToLabel/StringanditemToValueprops to resolve the display and form submission value from the object valueExpected behavior
<Select.Item value={object}>should be properly supportedThis reduces or prevents the need to map data to the conforming
value/labelformat before rendering itBase UI version
1.0.0-beta.2