Value formats and return shapes
The input format describes what you pass to value or defaultValue. The return shape describes what the component emits. They are independent.
| valueFormat | Input |
|---|---|
rows (default) |
Domain record(s) |
ids |
String or number identity/identities |
id-text |
{ id, text } pair(s) |
| returnShape | Single mode | Multiple mode |
|---|---|---|
id-text (default) |
IdText or null | IdText[] |
row |
T or null | T[] |
custom |
R or null | R[] |
<LookupSelect data={parts} columns={columns} mapper={mapper} mode="multiple" returnShape="custom" returnMap={{ map: part => ({ sku: part.code, label: part.name }) }} onChange={values => console.log(values)}/>Custom output is not automatically invertible. If your form stores a custom projection, separately retain domain rows or IDs for controlled input. When feeding an ID/text output back into value, set valueFormat="id-text". Duplicate input identities are normalized; single mode retains the first unique identity.
Parts to add to order
Choose parts…
Search by part or SKU, select records, then apply. Cancel leaves the previous value unchanged.
Committed value
[]
See the hydration guide when IDs refer to records outside the currently loaded data.