Skip to content

Field initial values are "undefined" #400

@wmadden

Description

@wmadden

Describe the bug

Despite providing defaultValues, the initial values of simple string fields are undefined.

This is occurring in the example CodeSandbox from the @tanstack/form docs: https://codesandbox.io/p/sandbox/github/tannerlinsley/react-form/tree/main/examples/react/simple

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/github/tannerlinsley/react-form/tree/main/examples/react/simple

Steps to reproduce

  1. Initialize a field with a default value of ""
  2. Render the form

Expected behavior

The input should be empty

How often does this bug happen?

None

Screenshots or Videos

image

Platform

Mac
Chrome
react-form@0.0.11

Tanstack Form adapter

None

TanStack Form version

0.0.11

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions