MCPcopy Index your code
hub / github.com/TanStack/form / Comp

Function Comp

packages/solid-form/tests/createField.test.tsx:17–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 function Comp() {
18 const form = createForm(() => ({ defaultValues: {} as Person }))
19
20 return (
21 <>
22 <form.Field
23 name="firstName"
24 defaultValue="FirstName"
25 children={(field) => {
26 return (
27 <input
28 data-testid="fieldinput"
29 value={field().state.value}
30 onBlur={field().handleBlur}
31 onInput={(e) => field().handleChange(e.currentTarget.value)}
32 />
33 )
34 }}
35 />
36 </>
37 )
38 }
39
40 const { getByTestId } = render(() => <Comp />)
41 const input = getByTestId('fieldinput')

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.90
handleSubmitMethod · 0.65
createFormFunction · 0.50

Tested by

no test coverage detected