Uh oh!
There was an error while loading. Please reload this page.
fix(fields): inline-edit relational fields with the standard picker (not a text box) - #2122
Merged
Merged
Conversation
The inline cell editor reuses the form's widgets, but its map (EDIT_WIDGETS) was a hand-maintained subset of the form's (fieldWidgetMap) and drifted: lookup / master_detail / user / owner had real form pickers yet fell back to a plain text box inline. Wire them to the SAME widgets the form uses (lookup/master_detail → LookupField, user/owner → UserField); they read the related-object dataSource from SchemaRendererContext, which the grid provides. Browser-verified on the field-zoo: clicking a Lookup cell opens the record picker with a search box and the 13 fetched Account records — not a text box, not empty. Drift-guard: index exports FORM_FIELD_TYPES + a test pins that every form widget type has an explicit inline decision (an editor, or an entry in the new INLINE_EXCLUDED_FIELD_TYPES with a reason), so the two maps can't silently drift again. Full fields suite (4918) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jun 30, 2026
Closed
os-zhuang added a commit
that referenced
this pull request
Jul 1, 2026
…2140) Follow-up to #2125. `LookupField`'s inline display now resolves every value shape the read cell (`LookupCellRenderer`) does, closing the remaining gaps: - JSON-encoded external-id references ('{"externalId":"…"}') are parsed and shown by their external id, and excluded from the hydration fetch so we never findOne() a raw JSON string. `recordToOption` gained an `externalId` fallback for both value and label. - Tolerant id matching: a String()-coerced fallback (`findOptionLoose`) resolves a numeric cell value against a string-keyed option (and vice versa), matching the read cell's comparison. Only consulted when the strict match misses. - `normalizeId` also unwraps JSON-encoded reference strings. Adds inline-editor tests for user / owner fields (they delegate to LookupField via UserField), completing coverage for the relational set wired inline in #2122. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
lookup / master_detail / user / owner fields now edit inline with the standard record picker — the same
LookupField/UserFieldthe form uses — instead of falling back to a plain text box.Why (caught in review)
Inline editing reuses the form's widgets, but the inline map (
EDIT_WIDGETS) was a hand-maintained subset of the form's (fieldWidgetMap) and had drifted — relational types had perfectly good form pickers, but nobody wired them into the inline map, so they degraded to a text box (you'd type a raw record id). The form already supported them; this just reuses them.How
lookup/master_detail→LookupField,user/owner→UserField. They read the related-object dataSource fromSchemaRendererContext, which the grid already provides — drop-in, sameFieldWidgetPropsinterface.Verified live (:5417 field-zoo)
Clicking a Lookup → Account cell opens the record picker ("选择…") with a search box and 13 fetched Account records (Northwind, Contoso, Fabrikam, Initech…) — not a text box, not empty. master_detail / user / owner likewise render the picker.
Drift-guard (so this can't recur)
indexnow exportsFORM_FIELD_TYPES; a test pins that every form widget type has an explicit inline decision — an editor inEDIT_WIDGETS, or an entry in the newINLINE_EXCLUDED_FIELD_TYPES(computed / binary / heavy-editor / container types, each documented). A future form widget can no longer silently become a text box or a missing editor in the grid.+4drift-guard tests; full@object-ui/fieldssuite (4918) green.🤖 Generated with Claude Code