Skip to content

fix: preserve form lifecycle in Mantine wrappers - #65

Merged
aranlucas merged 1 commit into
mainfrom
task/codebase-design-form-contracts
Oct 2, 2026
Merged

aranlucas merged 1 commit into
mainfrom
task/codebase-design-form-contracts

Conversation

@aranlucas

Copy link
Copy Markdown
Owner

Summary

  • Share controller lifecycle binding across all 43 wrappers so custom onBlur callbacks preserve touched state and on-blur validation.
  • Pass disabled to React Hook Form while preserving the Mantine UI setting and inherited form-level disabled state.
  • Keep exported props, raw group items, control-specific change callbacks, and legacy CheckboxGroup external value behavior compatible.
  • Add 16 real Mantine/RHF contract regressions plus typechecked public-prop coverage; document disabled submission semantics.

Verification

  • pnpm format
  • pnpm lint
  • pnpm typecheck (library, example, compatibility type contract)
  • pnpm test --run --maxWorkers=1 --no-file-parallelism: 106 tests pass across 44 files
  • pnpm build
  • git diff --check
  • The same new 16-case contract suite on unchanged main fails 12 lifecycle cases and passes four compatibility/control-specific cases. All 16 pass with the fix.

Compatibility and limitations

CheckboxGroup historically accepts and applies an external value. Removing that prop or ignoring it is a source/runtime-breaking change, so this PR deliberately preserves it and tests that behavior. A separate major-version decision could move callers to RHF defaultValues/defaultValue, setValue, or reset and make controller value authoritative. No breaking ownership correction is included here.

Validation used frozen-lockfile dependencies (Mantine 9.6.0, RHF 7.89.0, React 19.3.0) in jsdom, not the full peer-version matrix or a visual browser pass. The optional react-doctor scan was blocked by external telemetry review; no completed score is claimed. No npm release or deployment performed.

@aranlucas
aranlucas marked this pull request as ready for review October 2, 2026 05:02
@aranlucas
aranlucas merged commit 0869c6f into main Oct 2, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Oct 5, 2026
## [4.0.2](v4.0.1...v4.0.2) (2026-10-05)

### Bug Fixes

* keep pnpm 12 lockfiles compatible with Vercel ([#43](#43)) ([930e4a6](930e4a6))
* merge user refs and compose controller props in useFieldController ([#67](#67)) ([870aeff](870aeff))
* preserve form lifecycle in Mantine wrappers ([#65](#65)) ([0869c6f](0869c6f))
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant