getGlobalDefaultValues
getGlobalDefaultValues(
props):Record<string,unknown>
Defined in: packages/core/src/globals/utils.ts:19
Builds defaultValues for a TanStack Form from a global config.
Mirrors getCollectionDefaultValues — operates on GlobalConfig rather
than CollectionConfig. When document is provided (edit mode), uses its
field values; otherwise falls back to each field’s defaultValue.
Parameters
Section titled “Parameters”Input props.
document?
Section titled “document?”VexDocumentGlobal<string> | null
Optional existing flat global document (edit mode).
null means “no document persisted yet” — create mode with defaults.
global
Section titled “global”The global config whose fields define the form shape.
Returns
Section titled “Returns”Record<string, unknown>
Record<fieldKey, value> ready for useForm({ defaultValues }).