mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
fix type of event argument in onSubmit
* Fix type of event argument in onSubmit * Don't use alert in test code
This commit is contained in:
parent
25d2c9665b
commit
e69cfea13f
@ -10,7 +10,7 @@ import { TextFieldProps } from "material-ui";
|
||||
|
||||
export interface ValidatorFormProps {
|
||||
className?: string;
|
||||
onSubmit: (event: React.FormEventHandler) => void;
|
||||
onSubmit: (event: React.FormEvent) => void;
|
||||
instantValidate?: boolean;
|
||||
onError?: (errors: any[]) => void;
|
||||
debounceTime?: number;
|
||||
|
||||
@ -6,7 +6,9 @@ import {
|
||||
} from 'react-material-ui-form-validator';
|
||||
|
||||
class Test extends React.Component {
|
||||
onSubmitted = (event: React.FormEventHandler) => {};
|
||||
onSubmitted = (event: React.FormEvent) => {
|
||||
event.preventDefault(); // Actually preventDefault() is called by ValidatorForm
|
||||
}
|
||||
onError = (errors: any[]) => {};
|
||||
onValidate = (isValid: boolean) => {};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user