Convert stateful PureComponents to Component

Removing errors caused by shouldComponentUpdate being called
pull/10616/head
Brandon Farmer 2018-04-18 17:12:01 -07:00
parent 24b3956aa5
commit 90b0b2deb8
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import React, {PureComponent} from 'react' import React, {Component} from 'react'
import {connect} from 'react-redux' import {connect} from 'react-redux'
import {bindActionCreators} from 'redux' import {bindActionCreators} from 'redux'
import {withRouter, InjectedRouter} from 'react-router' import {withRouter, InjectedRouter} from 'react-router'
@ -45,7 +45,7 @@ interface Props {
} }
@ErrorHandling @ErrorHandling
class OrganizationsTableRow extends PureComponent<Props, {}> { class OrganizationsTableRow extends Component<Props, {}> {
public shouldComponentUpdate(nextProps) { public shouldComponentUpdate(nextProps) {
return !_.isEqual(this.props, nextProps) return !_.isEqual(this.props, nextProps)
} }

View File

@ -1,4 +1,4 @@
import React, {PureComponent} from 'react' import React, {Component} from 'react'
import {connect} from 'react-redux' import {connect} from 'react-redux'
import {bindActionCreators} from 'redux' import {bindActionCreators} from 'redux'
@ -46,7 +46,7 @@ interface Props {
} }
@ErrorHandling @ErrorHandling
export class TableOptions extends PureComponent<Props, {}> { export class TableOptions extends Component<Props, {}> {
constructor(props) { constructor(props) {
super(props) super(props)
this.moveField = this.moveField.bind(this) this.moveField = this.moveField.bind(this)

View File

@ -1,4 +1,4 @@
import React, {PureComponent} from 'react' import React, {Component} from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import classnames from 'classnames' import classnames from 'classnames'
@ -7,7 +7,7 @@ import {NULL_HOVER_TIME} from 'shared/constants/tableGraph'
import {ErrorHandling} from 'src/shared/decorators/errors' import {ErrorHandling} from 'src/shared/decorators/errors'
@ErrorHandling @ErrorHandling
class Crosshair extends PureComponent { class Crosshair extends Component {
shouldComponentUpdate(nextProps) { shouldComponentUpdate(nextProps) {
return this.props.hoverTime !== nextProps.hoverTime return this.props.hoverTime !== nextProps.hoverTime
} }