fix: Cross-platform FormSubmitEvent via Register

This commit is contained in:
Tanner Linsley
2023-05-01 11:58:55 -06:00
parent e1d7845721
commit f05ab79ef6
2 changed files with 15 additions and 1 deletions

View File

@@ -8,6 +8,10 @@ import { createUseField, type UseField } from './useField'
import { formContext } from './formContext'
declare module '@tanstack/form-core' {
interface Register {
FormSubmitEvent: React.FormEvent<HTMLFormElement>
}
// eslint-disable-next-line no-shadow
interface FormApi<TFormData> {
Form: FormComponent