0
Fork 0
mirror of https://github.com/TanStack/form.git synced 2026-11-18 07:36:42 +00:00
Commit graph

446 commits

Author SHA1 Message Date
Jhoan J. Ramírez
27a7a2bd09
docs(preact): add missing onUnmount to listeners event list (#2183) 2026-07-09 02:48:06 -07:00
Patrick Wehbe
b730192a02
docs: correct withFieldGroup props runtime note (#2217)
The withFieldGroup props comment said the props are "not used at
runtime", but they are. In createFormHook the render call spreads them
(render({ ...props, ...innerProps, group })), so they act as default
values that innerProps can override, the same as withForm does with
render({ ...props, ...innerProps }). The withForm docs already describe
this correctly as default values, so this updates the react, solid and
preact copies to match.

Closes #2099

Co-authored-by: Patrick Wehbe <patrick.wehbe.applications@gmail.com>
2026-07-09 02:43:41 -07:00
autofix-ci[bot]
e2222e23eb
ci: apply automated fixes and generate docs 2026-07-09 09:37:55 +00:00
autofix-ci[bot]
6a73479f2c
ci: apply automated fixes and generate docs 2026-05-28 16:57:24 +00:00
Corbin Crutchley
808f158b62
Form Groups (#2128)
* feat: initial work on FormGroupApi in core

* chore: initial (and wrong) per-form-group-validation

This is wrong because instead of keeping the state inside of `FormGroupApi` itself, we need to follow the same pattern of `FieldApi` and keep the state in `FormApi` and reference that state in a derived way.

* chore: create a common FieldLikeAPI to adopt in form groups shortly

* chore: implement FieldLike API on FormGroup

* chore: revert changes to FormApi validation logic

* chore: fix type issues with validation kind

* chore: minor fixes

* Revert "chore: revert changes to FormApi validation logic"

This reverts commit 756ddf8402.

* chore: filter fields to validate in formgroup

* chore: improve store

* chore: fix tests

* chore: fix another test

* chore: add submitmeta test

* ci: apply automated fixes and generate docs

* chore: add FormLike methods to FormGroup

* chore: add type tests

* chore: fix build

* chore: fix type tests

* ci: apply automated fixes and generate docs

* chore: export two missing items

* chore: add new interop FormGroupOptions type

* chore: initial implement of useFormGroup in React

* ci: apply automated fixes and generate docs

* chore: add formGroup to useForm

* chore: add initial React implementation tests

* ci: apply automated fixes and generate docs

* chore: add type tests for React adapter

* ci: apply automated fixes and generate docs

* chore: fix eslint

* ci: apply automated fixes and generate docs

* chore: add multi-step wizard

* ci: apply automated fixes and generate docs

* fix: handle resubmissions

* fix: validate on resubmit

* feat: add better onDynamic handling to FormGroupApi

* chore: first attempt to fix onDynamic change handling on groups

* chore: attempt 2

* chore: attempt 3

* chore: attempt 4

* Revert "chore: attempt 4"

This reverts commit 7546f08b94.

* chore: finalize fixing form errors

* chore: fix eslint

* chore: regenerate lockfile

* ci: apply automated fixes and generate docs

* docs: update the wizard example

* ci: apply automated fixes and generate docs

* chore: initial work on Vue FormGroup API

* ci: apply automated fixes and generate docs

* chore: revert useContext changes

* feat: add preact form group

* chore: fix tests and export names

* chore: add Preact wizard demo

* feat: add FormGroup support for Solid adapter

* chore: add formgroup tests for Solid

* chore: add type tests for Solid

* ci: apply automated fixes and generate docs

* chore: add Solid group example

* ci: apply automated fixes and generate docs

* chore: fix test

* feat: add FormGroup impl to Svelte

* ci: apply automated fixes and generate docs

* chore: add formGroup tests for Svelte

* ci: apply automated fixes and generate docs

* chore: add Svelte example

* chore: fix sherif

* feat: add Lit FormGroup API

* chore: add Lit FormGroup tests

* chore: refactor Lit tests

* ci: apply automated fixes and generate docs

* feat: implement FormGroup in Angular

* chore: add FormGroup Angular spec

* ci: apply automated fixes and generate docs

* feat: add withForm feature to Angular

* chore: update Angular large-form example to use new `withForm` API

* docs: add docs to Angular withForm example

* chore: add changeset

* chore: fix knip

* chore: initial multi-step-wizard Angular example

* chore: update the multi-step-wizard to use new API

* chore: add multi-step-wizard example to Lit

* ci: apply automated fixes and generate docs

* chore: add Vue example

* chore: fix CI

* chore: update to use Testing Library

* chore: make tests more Testing Library-y

* fix: isSubmitting now works with FormGroup

Thank you @gaganref!

* chore: fix Lit warning

* ci: apply automated fixes and generate docs

* chore: add currently failing tests

* fix: handle validation better in form groups

* chore: add test for duped group schema

* chore: update `form` error field to `group`

* chore: fix CI

* ci: apply automated fixes and generate docs

* chore: add test for isGroupValid and isFieldsValid

* ci: apply automated fixes and generate docs

* chore: refactor FormGroup to core

* chore: refactor Lit Form to use Lit Store properly

* chore: fix eslint

* ci: apply automated fixes and generate docs

* chore: remove temp changeset

* docs: initial docs for React adapter

* docs: add multi-step-wizard examples to docs site

* docs: add form group state docs for React

* docs: mirror React docs to Preact

* docs: add Solid docs

* docs: add Vue docs

* ci: apply automated fixes and generate docs

* docs: add groups docs for Svelte

* docs: add groups docs for Lit

* docs: add groups docs for Angular

* fix: handle issue with field group names

* ci: apply automated fixes and generate docs

* chore: fix CI

* chore: remove onXListenTo APIs

* chore: add onMount errors to groups

* chore: add onChange listeners to form

* chore: handle group validation async cleanup, onmount listener, et al

* chore: fix Group change listeners

* chore: add changeset

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-28 09:25:07 -07:00
autofix-ci[bot]
a769fbfd12
ci: apply automated fixes and generate docs 2026-05-26 17:44:33 +00:00
Corbin Crutchley
120473e270
Fix trusted provenance (#2194)
* chore: add items to trust policy

* chore: upgrade Changesets

* chore: upgrade PNPM

* chore: fix other TS values

* chore: use better Next version

* chore: upgrade TSC to 5.9 and Angular to 21

* chore: regenerate PNPM lock

* chore: fix TSC usage across-the-board

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-26 10:39:25 -07:00
autofix-ci[bot]
c47c93dbfb
ci: apply automated fixes and generate docs 2026-05-26 15:02:16 +00:00
autofix-ci[bot]
9b1a8cad9f
ci: apply automated fixes and generate docs 2026-05-26 14:32:24 +00:00
autofix-ci[bot]
13f85fa2f1
ci: apply automated fixes and generate docs 2026-05-26 14:28:31 +00:00
Jhoan J. Ramírez
a098e03294
docs(lit): replace deprecated getValue() with state.value in quick-start (#2182) 2026-05-26 07:22:48 -07:00
autofix-ci[bot]
e34dcb26bd
ci: apply automated fixes and generate docs 2026-05-10 22:28:24 +00:00
Corbin Crutchley
75b320279d
fix(angular-form): prevent full array re-renders in array mode (#2171)
* fix(angular-form): prevent full array re-renders in array mode

* ci: apply automated fixes and generate docs

* chore: fix build

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-10 17:13:26 -04:00
autofix-ci[bot]
026edd9632
ci: apply automated fixes and generate docs 2026-05-10 21:04:30 +00:00
Corbin Crutchley
19c3ec24e8
fix(solid-form): prevent full array re-renders in array mode (#2169)
* fix(solid-form): prevent full array re-renders in array mode

* chore: add changeset

* chore: fix build
2026-05-10 17:03:35 -04:00
Corbin Crutchley
572465876d
fix(svelte-form): prevent full array re-renders in array mode (#2170)
* fix(svelte-form): prevent full array re-renders in array mode

* chore: add changeset
2026-05-10 17:01:27 -04:00
autofix-ci[bot]
e216d18d8e
ci: apply automated fixes and generate docs 2026-05-10 20:48:30 +00:00
Ram Krishna Yadav
452b103060
fix(vue-form): prevent full array re-renders in array mode (#1963)
* fix(vue-form): prevent full array re-renders in array mode

* ci: apply automated fixes and generate docs

* refactor(vue-form): address review feedback

* ci: apply automated fixes and generate docs

* chore: update code to reflect React version a bit better

* docs: use mode=array for Vue docs

* chore: fix eslint

* chore: fix CI

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
2026-05-10 16:45:46 -04:00
autofix-ci[bot]
583741b9d1
ci: apply automated fixes and generate docs 2026-05-10 19:51:27 +00:00
autofix-ci[bot]
244dd23894
ci: apply automated fixes and generate docs 2026-05-10 19:37:49 +00:00
autofix-ci[bot]
cab9db4a45
ci: apply automated fixes and generate docs 2026-05-10 19:17:41 +00:00
autofix-ci[bot]
360b4ae2f5
ci: apply automated fixes and generate docs 2026-05-10 01:30:04 +00:00
Corbin Crutchley
c1ca9b4fed
Add Lit getFormType (#2165)
* feat: add getFormType helper to Lit

* chore: initial large-form example for Lit

* feat: add form subscriber

* ci: apply automated fixes and generate docs

* chore: update to use TanStack Store

* chore: add changeset

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-09 21:27:52 -04:00
autofix-ci[bot]
9856b9bd75
ci: apply automated fixes and generate docs 2026-05-09 19:18:41 +00:00
Corbin Crutchley
f34410d414
Port withForm feature to Angular Adapter (#2163)
* feat: add withForm feature to Angular

* chore: update Angular large-form example to use new `withForm` API

* docs: add docs to Angular withForm example

* chore: add changeset

* chore: fix knip
2026-05-09 15:17:44 -04:00
Corbin Crutchley
2a2ddd8a95
feat: add ability to get form type from Svelte (#2159)
* feat: add ability to get form type from Svelte

* chore: add changeset
2026-05-09 11:18:01 -04:00
autofix-ci[bot]
582386b2b5
ci: apply automated fixes and generate docs 2026-05-08 17:36:16 +00:00
Corbin Crutchley
f584b074a7
Preact integration (#2148)
* Add preact integration for tanstack form

* ci: apply automated fixes and generate docs

* Remove accidental reference to compat

* Remove use clien

* onInput for test parity

* Add docs

* Remove useUUid

* ci: apply automated fixes and generate docs

* Add example

* Fix

* chore: remove CHANGELOG

* chore: update version

* ci: apply automated fixes and generate docs

* Create compat bridge for outdated form-core store

* Apply suggestion from @JoviDeCroock

* chore: add changeset

* chore: update version number

---------

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-08 13:32:14 -04:00
autofix-ci[bot]
7cf22f2108
ci: apply automated fixes and generate docs 2026-05-08 15:06:28 +00:00
autofix-ci[bot]
e25aeee51a
ci: apply automated fixes and generate docs 2026-05-08 14:17:38 +00:00
dfedoryshchev
cab571a170
docs(react-form): show how to render formErrorMap.onChange when using Standard Schema (#2139)
* docs(react-form): show how to render formErrorMap.onChange when using Standard Schema

The form-level error rendering example uses a function validator
returning a string, which renders directly. Readers applying the same
pattern to a Standard Schema validator (Zod, Valibot, ArkType,
Effect/Schema) hit a TypeScript error because errorMap.onChange is then
Record<string, StandardSchemaV1Issue[]>, not a string.

Add a note after the example with the iteration pattern needed for the
Standard Schema case.

Closes #1564

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-07 02:29:49 -07:00
Andy Cochrane
3c508895e2
docs(react): fix incorrect form component reference in code comment (#2126) 2026-05-06 02:56:28 -07:00
A Badly Drawn Wobbler
2d9ff01210
docs: fix incorrect children prop on svelte validation guide (#2091)
Removed a JSX `children` prop was left on the validation guide for Svelte's validation guide, which does not work and is duplicated as a correct snippet later in the code block.
2026-05-06 02:54:54 -07:00
Tyson910
93be6f01ba
docs(svelte): add Form Composition guide and example to site nav (#2138)
Both docs/framework/svelte/guides/form-composition.md and
examples/svelte/large-form/ already exist (added in #1713) but were
never wired into docs/config.json, so they don't appear on the website.
2026-04-29 15:50:14 +02:00
autofix-ci[bot]
f958be927b
ci: apply automated fixes and generate docs 2026-04-21 06:18:51 +00:00
autofix-ci[bot]
eccf903db8
ci: apply automated fixes and generate docs 2026-04-10 17:40:24 +00:00
autofix-ci[bot]
070caca0d9
ci: apply automated fixes and generate docs 2026-04-10 11:40:46 +00:00
Harry Whorlow
d6ab662cdf
feat(react-from): extend appform (#2106)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-10 13:39:45 +02:00
autofix-ci[bot]
4e7c8a6151
ci: apply automated fixes and generate docs 2026-03-30 11:19:38 +00:00
Dominik Dorfmeister 🔮
7a1428d6ce
fix(core): field unmount (#2068)
* fix: make field unmount

* more tests

* ref: prefer object.entries

* jsdoc

* Fix field unmount issue in core

Fixes the issue with field unmount in core.

* ci: apply automated fixes and generate docs

* fix: update fieldInfo type to be partial and handle unmounted fields

* fix: cleanupFieldsOnUnmount flag

* fix: eslint

* fix: coderabbit findings

* fix: ensure async validation cancellation on field unmount

* more tests

* chore: remove default

* feat: listeners

* ci: apply automated fixes and generate docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Harry Whorlow <79278353+harry-whorlow@users.noreply.github.com>
Co-authored-by: Harry Whorlow <whorlowharry@gmail.com>
2026-03-27 18:46:47 +01:00
autofix-ci[bot]
d9d70cb5fb
ci: apply automated fixes and generate docs 2026-03-15 11:07:15 +00:00
Jhoan J. Ramírez
200aa7e24d
docs(*): fix broken code examples in Vue and React SSR guides (#2046)
* docs(*): fix broken code examples in Vue and React SSR guides

* docs(*): update useStore import to use re-export from react-form-start

* ci: apply automated fixes and generate docs

---------

Co-authored-by: dojhoanrd-jw <dojhoanrd-jw@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-09 09:01:39 +01:00
autofix-ci[bot]
f3d3dba4e5
ci: apply automated fixes and generate docs 2026-03-04 13:04:25 +00:00
autofix-ci[bot]
0c4d5b51dd
ci: apply automated fixes and generate docs 2026-02-15 08:49:55 +00:00
autofix-ci[bot]
61f3c0c024
ci: apply automated fixes and generate docs 2026-02-13 20:29:22 +00:00
autofix-ci[bot]
eea2a42c4a
ci: apply automated fixes and generate docs 2026-02-13 03:44:51 +00:00
Byeongwan Kim
c8814d9e4d
docs: clarify devtools should be installed as dev dependency (#2017)
Updated the devtools installation instructions to specify that the adapter should be installed as a dev dependency, since devtools are only used during development.

Fixes #2016
2026-02-04 19:10:34 -08:00
autofix-ci[bot]
638be14efc
ci: apply automated fixes and generate docs 2026-01-24 10:18:52 +00:00
LeCarbonator
a7eda7a388
feat(react-form): add useTypedAppFormContext (#1826)
* add useTypedAppFormContext

* remove unused ts-expect-error

* Add great-ghosts-sin.md

* ci: apply automated fixes and generate docs

* chore: fix PR

* chore: add unit tests

* docs(react-form): amend form composition with context

* chore: fix changeset

* chore: fix wrong version bump

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-23 09:39:11 +01:00
Adebesin Tolulope (Lope)
16dca2689f
docs(react-form): add Chakra UI integration guide (#1909)
* docs(react-form): add Chakra UI integration guide to ui-libraries documentation

Add comprehensive Chakra UI integration examples to the UI libraries guide,
covering both composable (Checkbox.Root) and pre-composed Checkbox components.
Includes code examples demonstrating how to integrate Chakra UI's Input and
Checkbox components with TanStack Form's Field component, maintaining
consistency with existing Mantine, Material UI, and shadcn/ui examples.

* docs: Update Chakra UI Checkbox example in UI libraries guide
2026-01-15 15:57:15 +01:00