mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-09 12:27:44 +00:00
fix: remove _TData abstraction (#465)
* fix: remove _TData abstraction * tests: fix
This commit is contained in:
@@ -29,7 +29,7 @@ describe('useForm', () => {
|
||||
|
||||
return () => (
|
||||
<form.Field name="firstName" defaultValue="">
|
||||
{({ field }: { field: FieldApi<string, Person> }) => (
|
||||
{({ field }: { field: FieldApi<Person, 'firstName'> }) => (
|
||||
<input
|
||||
data-testid={'fieldinput'}
|
||||
value={field.state.value}
|
||||
@@ -69,7 +69,7 @@ describe('useForm', () => {
|
||||
|
||||
return () => (
|
||||
<form.Field name="firstName" defaultValue="">
|
||||
{({ field }: { field: FieldApi<string, Person> }) => (
|
||||
{({ field }: { field: FieldApi<Person, 'firstName'> }) => (
|
||||
<p>{field.state.value}</p>
|
||||
)}
|
||||
</form.Field>
|
||||
@@ -101,7 +101,7 @@ describe('useForm', () => {
|
||||
{({
|
||||
field,
|
||||
}: {
|
||||
field: FieldApi<string, { firstName: string }>
|
||||
field: FieldApi<{ firstName: string }, 'firstName'>
|
||||
}) => {
|
||||
return (
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user