Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

CHANGELOG.md

337 lines13.5 KB

@tanstack/form-core

2.0.0-alpha.3

Major Changes

  • Release the first alpha of TanStack Form v2.

Minor Changes

  • #2419 584fcd9 - Restore field.replaceValue() and add form.replaceFieldValue() for replacing an array element in place

  • Feature: Specify default options for createFormHook

  • #2426 395d61c - BREAKING: schemaOutputs no longer exists. It is superceded by validatorOutputs. This is only a name change, the schema's result is the same as before

    validatorOutputs now allows a callback validator to specify data that the submit function should know. Schemas do this automatically, but now you can do it manually as well: run: ({ createOutput }) => createOutput('This is not a validation error and onSubmit can use this')

    The current map is:

    ValidatoronSubmit: ({ validatorOutputs }) => ...
    SchemaSchema's output data
    createOutput(X)X
    Default callback validatorundefined
    Validation errorN/A, onSubmit doesn't run
  • #2365 f8bbc25 - Feat: Field groups may now omit identity bindings like fields={{ a: 'a' }}

Patch Changes

  • #2436 a679245 - onSubmit now has access to createErrorMap

  • Refactor: Adapter formOptions/appFormOptions no longer shim the core types and runtime.

    BREAKING: formOptions.looseSchema and formOptions.strictSchema now require a schema as first parameter. This locks down inference to get the best type safety out of it vs. the options object alone.

    Fix: formOptions.looseSchema now allows defaultValues to omit properties instead of requiring them to be explicitly undefined.

  • Docs: Add JSDoc to code and API sections to website

  • Fix: Schema output type now properly guards against dynamically enabled validators

  • Fix: Subscription selectors now infer tuple return values without requiring as const.

  • Refactor: Use stable validator identity instead of index

  • Refactor: Use stable listener identity instead of index

  • Refactor: Store Form Groups on trie nodes instead of the form instance

2.0.0-alpha.2

Minor Changes

  • #2343 532cba4 - Feature: Specify default options for createFormHook

Patch Changes

  • #2348 4e37c69 - Refactor: Adapter formOptions/appFormOptions no longer shim the core types and runtime.

    BREAKING: formOptions.looseSchema and formOptions.strictSchema now require a schema as first parameter. This locks down inference to get the best type safety out of it vs. the options object alone.

    Fix: formOptions.looseSchema now allows defaultValues to omit properties instead of requiring them to be explicitly undefined.

  • #2339 c7e102b - Fix: Subscription selectors now infer tuple return values without requiring as const.

  • #2344 63c9ea3 - Refactor: Use stable listener identity instead of index

2.0.0-alpha.1

Patch Changes

  • #2331 547cbea - Docs: Add JSDoc to code and API sections to website

  • #2335 46c12c7 - Fix: Schema output type now properly guards against dynamically enabled validators

  • #2333 4341660 - Refactor: Use stable validator identity instead of index

  • #2326 fc424c0 - Refactor: Store Form Groups on trie nodes instead of the form instance

2.0.0-alpha.0

Major Changes

  • #2288 e68d53b - Release the first alpha of TanStack Form v2.

1.33.3

1.33.2

1.33.1

Patch Changes

  • #2236 3c57f6d - Fix TS4023 declaration emit

  • #2233 7b3012b - Fix FormGroupApi.distributeFieldErrors throwing TypeError: Cannot read properties of undefined when a group validator returns errors for a field that is not mounted yet

  • #2120 741da6b - fix(form-core): clear stale onBlur errors on re-submission

  • #2236 3c57f6d - Fix arktype usage typing in validators

  • #2056 6cd477a - fix: create fieldMeta on async validation for fields with errors

  • #2143 887a129 - fix race condition when listening to multiple Fields in onChangeListenTo

1.33.0

Minor Changes

1.32.1

Patch Changes

  • #2190 b402d7a - Fix array async default values not updating

  • #2152 d0d941d - Improve performance for mounting/unmounting <form.Field>

1.32.0

Minor Changes

  • Introduced a Prioritized Default System that ensures consistency between field metadata and form reset behavior. This change prioritizes field-level default values over form-level defaults across isDefaultValue derivation, form.reset(), and form.resetField(). This ensures that field metadata accurately reflects the state the form would return to upon reset and prevents undefined from being incorrectly treated as a default when a value is explicitly specified. (#2006)

Patch Changes

  • evaluate() incorrectly treated distinct non-plain objects with no own enumerable keys (Temporal types, RegExp, getter-only class instances) as equal because the key-iteration loop vacuously succeeded. A guard now returns false for such objects, falling back to referential inequality. (#2140)

  • exclude undefined from FormState errors type (427b3d9)

  • Prevent synchronous validators from returning Promises (#1987)

  • re-render arrays when length doesn't change but values do (#2172)

1.31.0

1.30.0

1.29.3

1.29.2

1.29.1

Patch Changes

  • Ensure fieldName is passed to custom validation logic functions (#2127)

1.29.0

1.28.6

Patch Changes

  • fix(core): field unmount (#2068)

1.28.5

Patch Changes

  • Upgrade packages and fixed theme pacakge missmatch (#2072)

1.28.4

Patch Changes

  • Refactor internals for substancially faster performance (#2035)

1.28.3

Patch Changes

  • form arrays now work again (#2041)

1.28.2

Patch Changes

  • bump @tanstack/store dependency to 0.8.0 (#2038)

1.28.1

Patch Changes

  • Fix various issues with SSR. Things should now work as-expected in many many more scenarios than before (#1890)

1.28.0

Patch Changes

  • fix: flatten errors consistently when validating before field mount (#2003)

    Fixed an issue where field.errors was incorrectly nested as [[error]] instead of [error] when form.validate() was called manually before a field was mounted. The flat(1) operation is now applied by default unless disableErrorFlat is explicitly set to true, ensuring consistent error structure regardless of when validation occurs.

  • run validation for fields without instances (#2001)

1.27.7

Patch Changes

  • Fix double-rendering of Solid fields (#1959)

1.27.6

Patch Changes

  • fix(form-core): Prevent runtime errors during validation (#1948)

1.27.5

Patch Changes

  • fix(form-core): Resolve memory leaks for SSR / Devtools (#1866)

  • Ensure dynamically rendered fields receive form validation errors (#1691)

1.27.4

Patch Changes

  • fix: prevent unnecessary re-renders when there are no async validators (#1929)

    Fields were re-rendering twice on each keystroke because isValidating was being set to true then false even when there were no async validators to run. This fix checks if there are actual async validators before toggling the isValidating state.

    Fixes #1130

1.27.3

Patch Changes

  • Bump TanStack pacer to pacer-lite for reduced custom event emissions. (#1876)

1.27.2

1.27.1

Patch Changes

  • Fix issues with methods not being present in React adapter (#1903)

1.27.0

Patch Changes

  • Fixed issues with React Compiler (#1893)

  • Fix issue with deleteField and numeric keys (#1891)

1.26.0

Patch Changes

  • fix stale fields on array changes (#1729)
  • allow explicitly setting field.handleChange(undefined) (#1729)

1.25.0

Patch Changes

  • Removes debug config from event client in form-core (#1852)

1.24.5

Patch Changes

    • Make fieldMeta record type Partial<> to reflect runtime behaviour (#1787)

1.24.4

Patch Changes

  • Optimise event client emissions and minor layout tweaks (#1758)

1.24.3

Patch Changes

  • respect dontValidate option in formApi array modifiers (#1775)

1.24.2

Patch Changes

  • fix(form-core): prevent runtime errors when using deleteField (#1706)

1.24.1

Patch Changes

  • fix(form-core): call onSubmitInvalid even when canSubmit is false (#1697)

1.24.0

Minor Changes

  • Removes UUID from package.json for native environments. Reverts formId to a getter function. (#1753)

1.23.3

Patch Changes

  • Bump @tanstack/devtools-event-client to 0.3.2, patches side effects in event client. (#1767)

1.23.2

Patch Changes

  • fix(form-core): handle string array indices in prefixSchemaToErrors (#1689)

1.23.1

Patch Changes

  • bump to latest event client, for angular ssr (#1761)

1.23.0

Minor Changes

  • ssr, dayjs, uuid, version bump patch (#1747)

  • Jumping v1.22.0 as it's incorrectly published, fixed adapter to core. (#1749)

1.22.0

Minor Changes

  • Bump core to match devtools, docs config update (#1739)