Skip to content

Commit

Permalink
fix: return FieldApi directly
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Jan 10, 2025
1 parent 5b87ca5 commit 43aa84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/svelte-form/src/createField.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type CreateField<
>,
'form'
>,
) => () => FieldApi<
) => FieldApi<
TParentData,
TName,
TFieldValidator,
Expand Down
1 change: 1 addition & 0 deletions packages/svelte-form/src/createForm.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function createForm<
// No clue right now how we do that
extendedApi.Field = Field
extendedApi.createField = (props) =>
// TODO (43081j): type is excessively deep.. no clue why yet
createField(() => {
return { ...props(), form: api }
})
Expand Down

0 comments on commit 43aa84c

Please sign in to comment.