* fix(react-form-start): replace deprecated inputValidator with validator
TanStack Start has deprecated createServerFn().inputValidator() in favour
of .validator(). Update the react-form-start package, example, and SSR docs
accordingly, and bump the @tanstack/react-start peer dependency to ^1.168.27
where the new API is available.
* chore: fix pnpm lock
* fix: remove errant peerdeps
---------
Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
* fix: re-export useSelector and document useStore migration
Re-export useSelector from TanStack Store adapters so consumers can
import it from @tanstack/form packages instead of only the deprecated
useStore alias. Updates docs, examples, and adds form.useSelector for
Vue, Solid, and Svelte.
Fixes#2203
* docs(preact): use selector-form useSelector in prose
---------
Co-authored-by: Corbin Crutchley <git@crutchcorn.dev>
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>
* 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>
* 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>
* 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>
* 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
* Refine language and formatting in basic concepts guide
Hey team,
These are some suggestions I have for how we could improve this page. It's mostly grammar and consistency fixes, but includes slight re-wording to improve clarity. I'm open to feedback.
* docs(form): Removed links to references and moved `isDefaultValue`
* ci: apply automated fixes and generate docs
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Making docs more robus
I ran into some errors caused by ESLint and I have found that a few other people did too, I think it would be good to include this in the docs.
* Wording change for linting issues
* 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