Add some more autobinds
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user