Cleanup
parent
86661f2676
commit
c6d728d510
|
@ -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})
|
||||
}
|
||||
|
|
|
@ -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'], '') || ''
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue