Skip to content

feat(options): async resolvers and dynamic dependencies#121

Merged
ladparth merged 9 commits intomainfrom
feat/field-options-and-dependencies
Apr 10, 2026
Merged

feat(options): async resolvers and dynamic dependencies#121
ladparth merged 9 commits intomainfrom
feat/field-options-and-dependencies

Conversation

@ladparth
Copy link
Copy Markdown
Contributor

Description

This PR introduces a robust system for handling async field options and dynamic field dependencies in BuzzForm. It enables developers to easily implement cascading dropdowns (e.g., Country > State > City) with automatic loading states, request deduplication, and stale value clearing.

Key Changes

Core (form-core)

  • Added OptionResolverRegistry and OptionResolver types to support async option fetching.
  • Introduced defineOptionResolvers helper for type-safe registration of fetchers.
  • Enhanced resolveOptions to handle dynamic option sources and conditions.
  • Updated dependency walking logic to support reactive field updates.

React Adapter (form-react)

  • Rewrote useFieldOptions hook to support async resolvers with built-in loading and error states.
  • Implemented automatic value clearing when a field's dependencies change or when its current value is no longer present in the updated options list.
  • Added support for request deduplication to prevent redundant API calls when multiple fields share the same resolver/args.
  • Added optionResolvers prop to Form, Field, and FieldRenderer for global or scoped resolver injection.

Docs / Web (apps/web)

  • Added a comprehensive guide for Option Resolvers in SKILL.md.
  • Added a "Country + State" form example demonstrating dynamic dependencies and async loading.

Other

  • Added setup-labels.js and setup-milestones.js scripts for repository initialization.
  • Added issue-resolution.md workflow for standardized agent-driven development.

Type of change

  • feat (New feature)
  • fix (Bug fix)
  • docs (Documentation changes)
  • refactor (Refactoring code without changing behavior)
  • test (Adding or updating tests)
  • chore (Maintenance, CI/CD, or Ops-related changes)

Related Issues

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
buzzform Ready Ready Preview, Comment Apr 10, 2026 0:51am

@ladparth ladparth self-assigned this Apr 10, 2026
@ladparth ladparth merged commit fdbaf50 into main Apr 10, 2026
3 checks passed
@ladparth ladparth deleted the feat/field-options-and-dependencies branch April 10, 2026 00:53
@github-actions github-actions Bot mentioned this pull request Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant