@tanstack/form-core
Advanced tools
Comparing version 0.19.2 to 0.19.3
import { Store } from "@tanstack/store"; | ||
import { getSyncValidatorArray, getAsyncValidatorArray } from "./utils.js"; | ||
import { getBy, getSyncValidatorArray, getAsyncValidatorArray } from "./utils.js"; | ||
class FieldApi { | ||
@@ -49,5 +49,4 @@ constructor(opts) { | ||
this.update = (opts2) => { | ||
var _a; | ||
if (this.state.value === void 0) { | ||
const formDefault = (_a = opts2.form.options.defaultValues) == null ? void 0 : _a[opts2.name]; | ||
const formDefault = getBy(opts2.form.options.defaultValues, opts2.name); | ||
if (opts2.defaultValue !== void 0) { | ||
@@ -54,0 +53,0 @@ this.setValue(opts2.defaultValue); |
{ | ||
"name": "@tanstack/form-core", | ||
"version": "0.19.2", | ||
"version": "0.19.3", | ||
"description": "Powerful, type-safe, framework agnostic forms.", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
import { Store } from '@tanstack/store' | ||
import { getAsyncValidatorArray, getSyncValidatorArray } from './utils' | ||
import { getAsyncValidatorArray, getBy, getSyncValidatorArray } from './utils' | ||
import type { FieldInfo, FormApi } from './FormApi' | ||
@@ -425,4 +425,3 @@ import type { | ||
if (this.state.value === undefined) { | ||
const formDefault = | ||
opts.form.options.defaultValues?.[opts.name as keyof TParentData] | ||
const formDefault = getBy(opts.form.options.defaultValues, opts.name) | ||
@@ -429,0 +428,0 @@ if (opts.defaultValue !== undefined) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
379886
6338