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

86 commits

Author SHA1 Message Date
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]
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
autofix-ci[bot]
e34dcb26bd
ci: apply automated fixes and generate docs 2026-05-10 22:28:24 +00: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
autofix-ci[bot]
e25aeee51a
ci: apply automated fixes and generate docs 2026-05-08 14:17:38 +00:00
autofix-ci[bot]
d9d70cb5fb
ci: apply automated fixes and generate docs 2026-03-15 11:07:15 +00: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]
7a4b530d4b
ci: apply automated fixes and generate docs 2025-12-29 05:03:25 +00:00
autofix-ci[bot]
e6e280b802
ci: apply automated fixes and generate docs 2025-12-15 11:55:55 +00:00
autofix-ci[bot]
883867d2bb
ci: apply automated fixes and generate docs 2025-12-07 12:21:18 +00:00
Lachlan Collins
ffa4fb8b9d
docs: correct local relative links (#1906)
* docs: correct local relative links

* String
2025-12-05 22:39:01 +11:00
mattpeng
daa011292f
docs(solid-form): update the example code of async initial values (#1442)
Update async-initial-values.md

- Destructuring query breaks the reactivity.
- Don't do early return in Solid component, because it only runs once.
2025-12-01 01:34:01 -08:00
Lachlan Collins
ae5d57275b
ci: remove @tanstack/publish-config (#1881)
* ci: remove @tanstack/publish-config

* Update docs

* Fix links

* Fix workflow

* Use prettier experimental cli

* Add back test command
2025-11-29 19:26:37 +11:00
autofix-ci[bot]
75be351bf9
ci: apply automated fixes and generate docs 2025-11-24 10:09:37 +00:00
Vijayabaskar
89c4f24fb4
feat(solid-form): add withFieldGroup API (#1783)
* feat(solid-form): add withFieldGroup API

* ci: apply automated fixes and generate docs

* chore(solid-form): add withFieldGroup API changeset added and formatting fic

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: LeCarbonator <18158911+LeCarbonator@users.noreply.github.com>
2025-11-17 07:16:09 +01:00
autofix-ci[bot]
9f8de3f8ea
ci: apply automated fixes and generate docs 2025-11-12 18:57:56 +00:00
Harry Whorlow
154ac183a6
feat(devtools): update to devtools utils, add solid devtools (#1789) 2025-11-12 19:57:01 +01:00
Alex Kostyniuk
2debbd5c67
docs: enhance array field methods description with additional methods (#1827)
enhance array field description
2025-11-05 07:05:41 +01:00
autofix-ci[bot]
f403e3d08b
ci: apply automated fixes and generate docs 2025-11-01 06:14:04 +00:00
Alex Kostyniuk
c3a9b61a05
docs: enhance validation guide with tip on preventing submission when form is untouched (#1814)
* Enhance validation guide with preventing submission tip

Added guidance on preventing form submission before interaction.

* move the tip after the code block to no break logic

* enhance guide for all frameworks
2025-10-29 07:03:47 +01:00
autofix-ci[bot]
7778f3d149
ci: apply automated fixes and generate docs 2025-09-22 04:34:24 +00:00
autofix-ci[bot]
dc88df0d88
ci: apply automated fixes and generate docs 2025-09-15 05:11:36 +00:00
autofix-ci[bot]
b0e5206e74
ci: apply automated fixes and generate docs 2025-08-25 04:24:40 +00:00
autofix-ci[bot]
d3a1b594e0
ci: apply automated fixes and generate docs 2025-08-18 05:06:15 +00:00
autofix-ci[bot]
9e092e2914
ci: apply automated fixes and generate docs 2025-08-11 04:29:49 +00:00
autofix-ci[bot]
c82fe542c3
ci: apply automated fixes and generate docs 2025-08-05 08:09:30 +00:00
Corbin Crutchley
cca8de79c3
feat: Add alternative validation methods (#1622)
* chore: initial ideation

* chore: move to correct location

* chore: more work

* chore: pass both tests

* ci: apply automated fixes and generate docs

* chore: fix ESlint

* chore: added async logic

* ci: apply automated fixes and generate docs

* chore: add back default validation to the RHF values

* ci: apply automated fixes and generate docs

* chore: remove old async and sync validation logic

* chore: mostly correct TS types

* chore: fix minor type errors

* chore: fix type tests

* chore: fix Angular TS types

* chore: fix Lit's types

* docs: update React types

* chore: finish solid types

* chore: fix Svelte types

* chore: fix Vue types

* chore: add revalidate mode

* chore: revert specific changes made to track handlers

* chore: fix revalidate mode to behave as it does in RHF

* chore: rename the submission attempts

* ci: apply automated fixes and generate docs

* chore: reintroduce validation logic

* chore: fix submission validation logic

* chore: fix types against `main`

* chore: fix types

* chore: regenerate lockfile and package upgrade

* chore: regen lockfile against main

* chore: add debounce timing to dynamic

* chore: add tests to field validation as well

* chore: add basic dynamic validation docs for React

* docs: add example docs for dynamic usage

* docs: add Lit dynamic validation docs

* ci: apply automated fixes and generate docs

* docs: add dynamic validation docs to Angular

* docs: add solid dynamic validation example

* docs: add Svelte docs for dynamic

* docs: add dynamic validation to Vue

* ci: apply automated fixes and generate docs

* chore: fix CI

* chore: move server validation to right place

* fix: server validation should now function as-expected

* chore: fix CI

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-04 14:41:18 -07:00
autofix-ci[bot]
cc0aee9599
ci: apply automated fixes and generate docs 2025-08-04 02:22:44 +00:00
LeCarbonator
6938517990
docs: update Standard Schema library list (#1655)
docs: update standard schema library list
2025-08-01 21:45:32 +02:00
Muhammad Amin Saffari Taheri
117b7432d5
docs(solid-form): update examples from react to solid. (#1607) 2025-07-08 10:18:24 -07:00
autofix-ci[bot]
824d72383a
ci: apply automated fixes and generate docs 2025-07-07 07:37:55 +00:00
Muhammad Amin Saffari Taheri
6879f57cd3
feat(solid-form): add createFormHook for solid-js. (#1597)
* feat(solid-form): add `createFormHook` for solid-js.

* fix(solid-form): make the field in useFieldContext an accessor.

* fix(solid-form): directly assign values to form object.

This fixes and issue where some parts of the form, like submitting didn't work.

* feat(solid-form): add docs for form composition for solid.

* ci: apply automated fixes and generate docs

* fix: move to PoeplePage to align with the large form example.

* feat(solid-form): add large form example.

* ci: apply automated fixes and generate docs

* chore: use tanstack store adapter

* 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>
2025-07-06 15:33:19 -07:00
autofix-ci[bot]
1f69b680ed
ci: apply automated fixes and generate docs 2025-07-06 22:26:53 +00:00
Michael
77acb338bb
docs: corrected field state definitions (#1540)
Co-authored-by: Harry Whorlow <whorlowharry@gmail.com>
Co-authored-by: Harry Whorlow <79278353+harry-whorlow@users.noreply.github.com>
2025-06-05 12:06:59 +02:00
autofix-ci[bot]
8f1a942897
ci: apply automated fixes and generate docs 2025-06-01 03:42:13 +00:00
Tanner Linsley
901180274c docs: fix links
commit 770f8e909c
Author: Tanner Linsley <tannerlinsley@gmail.com>
Date:   Sat May 24 00:13:23 2025 -0600

    docs: fix relative links
2025-05-24 00:48:09 -06:00
autofix-ci[bot]
f13c4ecb8b
ci: apply automated fixes and generate docs 2025-05-19 07:04:38 +00:00
autofix-ci[bot]
2a52a8070d
ci: apply automated fixes and generate docs 2025-05-01 08:25:17 +00:00
LeCarbonator
443d270bfa
feat(form-core): add <FieldMeta>.isValid (#1422)
* feat(form-core): add <FieldMeta>.isValid

this is a shortened counterpart to checking
field.state.meta.errors.length > 0

* docs: use isValid checks instaed of error length checks

* fix: read field derived data from the right store

* style: revert extracting errorMap variable in setMeta

* style: revert extracting errorMap variable in setFieldMeta

* docs: rephrase isValid description and related props

---------

Co-authored-by: Leonardo Montini <lion.48m@gmail.com>
Co-authored-by: Luca <luca@luca-laptop.int.dr-jakob.ch>
2025-04-29 12:21:58 +02:00
LeCarbonator
9f68452f91
docs: Expand submission handling and validation documentation (#1428)
Co-authored-by: Pascal Küsgen <pascalkuesgen@gmail.com>
Co-authored-by: Harry Whorlow <79278353+harry-whorlow@users.noreply.github.com>
2025-04-27 12:57:16 +02:00
autofix-ci[bot]
1399731906
ci: apply automated fixes and generate docs 2025-04-19 08:22:21 +00:00
LeCarbonator
ba664901b3
feat(form-core): add parseValueWithSchema() stateless method (#1421)
* feat(FormApi): add standard schema validator wrapper

* feat(form-core): add parseValueWithSchema methods

* docs: add parseValueWithSchema documentation

* refactor(form-core): rename FormApi#parseValuesWithSchema

This is to be consistent with other methods
that include the word Values.

* refactor(form-core): adjust unit tests for parseValuesWithSchema

* refactor(FormApi): rename parseFieldValuesWithSchema

Since we don't pass a field to the method, the term
shouldn't be included in the method name.

* docs: generate
2025-04-16 16:15:06 +02:00
Christopher Horobin
4426fd529d
fix(form-core): unions for deep values (#1403)
* fix: unions for deep values

* ci: apply automated fixes and generate docs

* fix: do not use intersection

* ci: apply automated fixes and generate docs

* fix: use mapped type instead of intersections

* ci: apply automated fixes and generate docs

* fix: object test

* ci: apply automated fixes and generate docs

* fix: linter
2025-04-11 17:48:08 +02:00
Christopher Horobin
4e15826d44
perf(form-core): reduce instantiations when type checking (#1262)
* perf: add variance annotations

* perf(form-core): improve ts performance for large example

* ci: apply automated fixes and generate docs

* perf(form-core): rework to use UnionToIntersection, add other variance annotations and remove Omit

* ci: apply automated fixes and generate docs

* fix: revert some variance annotations for later

* ci: apply automated fixes and generate docs

* chore: fix knip

* chore: remove omit

* ci: apply automated fixes and generate docs

* perf(solid-form): apply interface performance improvments to solid

* ci: apply automated fixes and generate docs

* perf(vue-form): add interface changes to vue

* ci: apply automated fixes and generate docs

* chore: cleanup

* ci: apply automated fixes and generate docs

* chore: cleanup

* ci: apply automated fixes and generate docs

* refactor: use mapped type instead of union to intersection

* ci: apply automated fixes and generate docs

* chore: fix build

* ci: apply automated fixes and generate docs

* chore: change back to 'name'

* ci: apply automated fixes and generate docs

* fix: remove [number]

* ci: apply automated fixes and generate docs
2025-04-02 18:32:51 +02:00
renovate[bot]
be71c4e666
chore(deps): update all non-major dependencies (#1263)
* chore(deps): update all non-major dependencies

* ci: apply automated fixes and generate docs

* Remove unused ts-expect-error

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-31 20:02:48 +11:00