Skip to content

Commit

Permalink
fix(antd/next): fix event type incorrect of Submit (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuweiGL authored Jun 28, 2021
1 parent 8bfb713 commit acec46f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/reset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useForm } from '@formily/react'
export interface IResetProps
extends Formily.Core.Types.IFieldResetOptions,
ButtonProps {
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => boolean | void
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => any
onResetValidateSuccess?: (payload: any) => void
onResetValidateFailed?: (
feedbacks: Formily.Core.Types.IFormFeedback[]
Expand Down
4 changes: 2 additions & 2 deletions packages/antd/src/submit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ButtonProps } from 'antd/lib/button'
import { useForm, observer } from '@formily/react'

export interface ISubmitProps extends ButtonProps {
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => boolean | void
onSubmit?: (values: any) => Promise<any> | any
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => any
onSubmit?: (values: any) => any
onSubmitSuccess?: (payload: any) => void
onSubmitFailed?: (feedbacks: Formily.Core.Types.IFormFeedback[]) => void
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/reset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useForm } from '@formily/react'
export interface IResetProps
extends Formily.Core.Types.IFieldResetOptions,
ButtonProps {
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => boolean | void
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => any
onResetValidateSuccess?: (payload: any) => void
onResetValidateFailed?: (
feedbacks: Formily.Core.Types.IFormFeedback[]
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/submit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ButtonProps } from '@alifd/next/lib/button'
import { useForm, observer } from '@formily/react'

interface ISubmitProps extends ButtonProps {
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => boolean | void
onSubmit?: (values: any) => Promise<any> | any
onClick?: (e: React.MouseEvent<Element, MouseEvent>) => any
onSubmit?: (values: any) => any
onSubmitSuccess?: (payload: any) => void
onSubmitFailed?: (feedbacks: Formily.Core.Types.IFormFeedback[]) => void
}
Expand Down

0 comments on commit acec46f

Please sign in to comment.