Remove arrow functions from props
parent
4b914c0f5c
commit
fde1f478f4
|
@ -11,8 +11,6 @@ class MeasurementDropdown extends Component {
|
|||
this.state = {
|
||||
measurements: [],
|
||||
}
|
||||
|
||||
this._getMeasurements = ::this._getMeasurements
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -35,12 +33,12 @@ class MeasurementDropdown extends Component {
|
|||
items={measurements.map(text => ({text}))}
|
||||
selected={measurement || 'Select Measurement'}
|
||||
onChoose={onSelectMeasurement}
|
||||
onClick={() => onStartEdit(null)}
|
||||
onClick={onStartEdit}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
async _getMeasurements() {
|
||||
_getMeasurements = async () => {
|
||||
const {source: {links: {proxy}}} = this.context
|
||||
const {
|
||||
measurement,
|
||||
|
|
|
@ -11,8 +11,6 @@ class DatabaseDropdown extends Component {
|
|||
this.state = {
|
||||
databases: [],
|
||||
}
|
||||
|
||||
this._getDatabases = ::this._getDatabases
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -32,12 +30,12 @@ class DatabaseDropdown extends Component {
|
|||
items={databases.map(text => ({text}))}
|
||||
selected={database || 'Loading...'}
|
||||
onChoose={onSelectDatabase}
|
||||
onClick={onStartEdit ? () => onStartEdit(null) : null}
|
||||
onClick={onStartEdit ? onStartEdit : null}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
async _getDatabases() {
|
||||
_getDatabases = async () => {
|
||||
const {source} = this.context
|
||||
const {database, onSelectDatabase, onErrorThrown} = this.props
|
||||
const proxy = source.links.proxy
|
||||
|
|
Loading…
Reference in New Issue