pull/10616/head
Andrew Watkins 2018-05-12 22:30:31 -07:00
parent 86661f2676
commit c6d728d510
3 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ class QueryEditor extends PureComponent<Props, State> {
this.editor = React.createRef<HTMLTextAreaElement>()
}
public componentWillReceiveProps(nextProps) {
public componentWillReceiveProps(nextProps: Props) {
if (this.props.query !== nextProps.query) {
this.setState({value: nextProps.query})
}

View File

@ -37,7 +37,7 @@ class DataExplorerVisualization extends PureComponent<Props, State> {
this.state = this.initialState
}
public componentWillReceiveProps(nextProps) {
public componentWillReceiveProps(nextProps: Props) {
const {activeQueryIndex, queryConfigs} = nextProps
const nextQueryText = this.getQueryText(queryConfigs, activeQueryIndex)
const queryText = this.getQueryText(
@ -117,7 +117,7 @@ class DataExplorerVisualization extends PureComponent<Props, State> {
this.setState({view})
}
private getQueryText(queryConfigs, index): string {
private getQueryText(queryConfigs: QueryConfig[], index: number): string {
// rawText can be null
return _.get(queryConfigs, [`${index}`, 'rawText'], '') || ''
}

View File

@ -159,7 +159,7 @@ class WriteDataForm extends PureComponent<Props, State> {
this.fileInput.value = ''
}
private handleDragOver = e => {
private handleDragOver = (e: DragEvent<HTMLDivElement>) => {
e.preventDefault()
e.stopPropagation()
}
@ -185,7 +185,7 @@ class WriteDataForm extends PureComponent<Props, State> {
}
}
private handleFileInputRef = r => (this.fileInput = r)
private handleFileInputRef = (r: HTMLInputElement) => (this.fileInput = r)
}
export default OnClickOutside(WriteDataForm)