Commit a15b89a
feat(spec,showcase): allowCreate flag for inline lookup quick-create (#2128)
Exposes the opt-in inline quick-create the objectui record picker supports:
when no match exists, the user creates a record from the typed text via an
optimistic dataSource.create with the display field. Best for simple objects
whose only required field is the display field.
- spec: add `allowCreate` to FieldSchema (flows through Field.lookup via
FieldInput); classify it live in the liveness ledger (objectui consumer).
- showcase: enable it on showcase_category.parent (Category requires only
`name`, so quick-create succeeds) to demonstrate the flow end-to-end.
- test: assert allowCreate survives FieldSchema.parse.
Pairs with objectui #1863 (renderer quick-create reads allowCreate ||
allow_create).
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent adac0f7 commit a15b89a
4 files changed
Lines changed: 8 additions & 1 deletion
File tree
- examples/app-showcase/src/objects
- packages/spec
- liveness
- src/data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
0 commit comments