Add some more autobinds

This commit is contained in:
John Lyon-Smith
2018-03-23 07:33:52 -07:00
parent 1b35ac8b22
commit 54365d3566
3 changed files with 6 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import { Column, Button, BoundInput, BoundButton } from 'ui'
import { regExpPattern } from 'regexp-pattern'
import { FormBinder } from 'react-form-binder'
import autobind from 'autobind-decorator'
export class ProfileForm extends React.Component {
static propTypes = {
@@ -62,8 +63,6 @@ export class ProfileForm extends React.Component {
constructor(props) {
super(props)
this.handleSubmit = this.handleSubmit.bind(this)
this.state = {
binder: new FormBinder(
this.props.user, ProfileForm.bindings, this.props.onModifiedChanged)
@@ -79,6 +78,7 @@ export class ProfileForm extends React.Component {
}
}
@autobind
handleSubmit(e) {
e.preventDefault()