Skip to content

Commit

Permalink
fix handlers types
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Nov 8, 2022
1 parent 901aed2 commit f71d87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Formsy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type OnSubmitCallback = (
model: IModel,
resetModel: IResetModel,
updateInputsWithError: IUpdateInputsWithError,
event: React.SyntheticEvent<React.FormHTMLAttributes<any>>,
event: React.SyntheticEvent<HTMLFormElement>,
) => void;

type FormElementType =
Expand Down Expand Up @@ -356,7 +356,7 @@ export class Formsy extends React.Component<FormsyProps, FormsyState> {
public isChanged = () => !utils.isSame(this.getPristineValues(), this.getCurrentValues());

// Update model, submit to url prop and send the model
public submit = (event?: React.SyntheticEvent) => {
public submit = (event?: React.SyntheticEvent<HTMLFormElement>) => {
const { onSubmit, onValidSubmit, onInvalidSubmit, preventDefaultSubmit } = this.props;
const { isValid } = this.state;

Expand Down

0 comments on commit f71d87d

Please sign in to comment.