Skip to content

jsonforms-renderers: add AutoFillGroup composite control - #22

Open
mushrafmim wants to merge 1 commit into
mainfrom
feat/21-autofill-group
Open

jsonforms-renderers: add AutoFillGroup composite control#22
mushrafmim wants to merge 1 commit into
mainfrom
feat/21-autofill-group

Conversation

@mushrafmim

Copy link
Copy Markdown
Collaborator

Summary

  • Adds AutoFillGroup, a Group-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.
  • SearchOption widened to an open record ({id, name, [key: string]: unknown}) so a registered search service can return a full record, not just {id, name}.
  • SearchSelectControl now persists the full selected option as payload alongside {value, label} (object mode only) — a 2-line change, no new lookup.
  • AutoFillGroupControl watches its trigger's payload (a normal sibling Control, so it inherits whatever search mode — paginated or not — that control already has) and auto-matches every descendant Control by relative path + schema-type compatibility, skipping and warning on a mismatch instead of failing silently. An explicit options.autoFill.fill array remains as an override for renames/reshaping/wholesale drops.
  • Rendered as a left-accent callout box with a magic-wand header so it reads as a distinct composite, not a plain Group.

See #21 for the full design writeup and known gaps.

Test plan

  • npm run type-check passes
  • npm test passes (139 existing tests, unaffected)
  • Manually traced the data flow for the new dev/fixtures.ts "Auto-Fill Group" fixture (select → department/firstName/lastName fill; clear → fields clear)
  • Not yet visually verified in a running browser (no headless-browser tooling was available in the environment this was built in) — please sanity-check via npm run dev → "Auto-Fill Group" fixture before merging

🤖 Generated with Claude Code

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
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2994a47d-4192-4035-8d51-d5fc8a70d262


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jsonforms-renderers: AutoFillGroup — composite control to auto-fill sibling fields from an API-backed selection

1 participant