Fix event types.

master
Tom Hacohen 7 years ago
parent e48ebc5137
commit 06887c58c3

@ -83,7 +83,7 @@ const ValueTypeComponent = (props: ValueTypeComponentProps) => {
hintText={props.hintText} hintText={props.hintText}
style={props.style} style={props.style}
value={props.value.value} value={props.value.value}
onChange={(event: any) => props.onChange(props.name, props.value.type, event.target.value)} onChange={(event: React.ChangeEvent<any>) => props.onChange(props.name, props.value.type, event.target.value)}
/> />
<IconButton <IconButton
onClick={() => props.onClearRequest(props.name)} onClick={() => props.onClearRequest(props.name)}
@ -245,7 +245,7 @@ class ContactEdit extends React.PureComponent {
this.handleChange(name, value); this.handleChange(name, value);
} }
onSubmit(e: any) { onSubmit(e: React.FormEvent<any>) {
e.preventDefault(); e.preventDefault();
let contact = (this.props.contact) ? let contact = (this.props.contact) ?

@ -99,7 +99,7 @@ class EventEdit extends React.PureComponent {
} }
handleInputChange(event: any) { handleInputChange(event: React.ChangeEvent<any>) {
const name = event.target.name; const name = event.target.name;
const value = event.target.value; const value = event.target.value;
this.handleChange(name, value); this.handleChange(name, value);
@ -109,7 +109,7 @@ class EventEdit extends React.PureComponent {
this.setState({allDay: !this.state.allDay}); this.setState({allDay: !this.state.allDay});
} }
onSubmit(e: any) { onSubmit(e: React.FormEvent<any>) {
e.preventDefault(); e.preventDefault();
if ((this.state.start === '') || (this.state.end === '')) { if ((this.state.start === '') || (this.state.end === '')) {

@ -45,7 +45,7 @@ class LoginForm extends React.PureComponent {
this.handleInputChange = this.handleInputChange.bind(this); this.handleInputChange = this.handleInputChange.bind(this);
} }
handleInputChange(event: any) { handleInputChange(event: React.ChangeEvent<any>) {
const name = event.target.name; const name = event.target.name;
const value = event.target.value; const value = event.target.value;
this.setState({ this.setState({

@ -28,7 +28,7 @@ class DateTimePicker extends React.PureComponent {
this.reportChange = this.reportChange.bind(this); this.reportChange = this.reportChange.bind(this);
} }
handleInputChange(event: any) { handleInputChange(event: React.ChangeEvent<any>) {
const name = event.target.name; const name = event.target.name;
const value = event.target.value; const value = event.target.value;
this.setState( this.setState(

Loading…
Cancel
Save