Remove autobind decorator. Fix bugs in AR view
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from "react-native"
|
||||
import { Icon, Header } from "../ui"
|
||||
import { MessageModal } from "../Modal"
|
||||
import autobind from "autobind-decorator"
|
||||
import { reactAutoBind } from "auto-bind2"
|
||||
import { SwipeListView } from "react-native-swipe-list-view"
|
||||
import { api } from "../API"
|
||||
import {
|
||||
@@ -36,6 +36,7 @@ const styles = StyleSheet.create({
|
||||
export class WorkItemList extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
reactAutoBind(this)
|
||||
this.state = {
|
||||
messageModal: null,
|
||||
}
|
||||
@@ -74,12 +75,10 @@ export class WorkItemList extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleItemSelect(item, ref) {
|
||||
this.props.history.push(`/workItem?id=${item._id}`)
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleItemDelete(item, ref) {
|
||||
api
|
||||
.deleteWorkItem(item._id)
|
||||
@@ -110,17 +109,14 @@ export class WorkItemList extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleMessageDismiss() {
|
||||
this.setState({ messageModal: null })
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleDonePress() {
|
||||
this.props.history.push("/workItem")
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleBackPress() {
|
||||
const { history } = this.props
|
||||
|
||||
|
||||
Reference in New Issue
Block a user