jsonforms-renderers: add AutoFillGroup composite control - #22
Open
mushrafmim wants to merge 1 commit into
Open
Conversation
Adds a Group-like renderer that fills sibling fields from a trigger
field's own selected search-result payload. SearchOption is widened
to an open record and SearchSelectControl now persists the full
selected option alongside {value, label}, so AutoFillGroup can match
it against sibling scopes by relative path + type, with an explicit
`fill` mapping available for renames/reshaping.
Closes #21
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 free
to 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.
Summary
AutoFillGroup, aGroup-like composite renderer that fills sibling fields in the same form from a trigger field's own selected record — closes jsonforms-renderers: AutoFillGroup — composite control to auto-fill sibling fields from an API-backed selection #21.SearchOptionwidened to an open record ({id, name, [key: string]: unknown}) so a registered search service can return a full record, not just{id, name}.SearchSelectControlnow persists the full selected option aspayloadalongside{value, label}(object mode only) — a 2-line change, no new lookup.AutoFillGroupControlwatches its trigger'spayload(a normal siblingControl, so it inherits whatever search mode — paginated or not — that control already has) and auto-matches every descendantControlby relative path + schema-type compatibility, skipping and warning on a mismatch instead of failing silently. An explicitoptions.autoFill.fillarray remains as an override for renames/reshaping/wholesale drops.Group.See #21 for the full design writeup and known gaps.
Test plan
npm run type-checkpassesnpm testpasses (139 existing tests, unaffected)dev/fixtures.ts"Auto-Fill Group" fixture (select →department/firstName/lastNamefill; clear → fields clear)npm run dev→ "Auto-Fill Group" fixture before merging🤖 Generated with Claude Code