diff --git a/public/app/features/dashboard/panel_editor/EditorTabBody.tsx b/public/app/features/dashboard/panel_editor/EditorTabBody.tsx index 0413cae8a7b..3183f7a7b24 100644 --- a/public/app/features/dashboard/panel_editor/EditorTabBody.tsx +++ b/public/app/features/dashboard/panel_editor/EditorTabBody.tsx @@ -36,7 +36,7 @@ export class EditorTabBody extends PureComponent { toolbarItems: [], }; - constructor(props) { + constructor(props: Props) { super(props); this.state = { diff --git a/public/app/features/dashboard/panel_editor/VisualizationTab.tsx b/public/app/features/dashboard/panel_editor/VisualizationTab.tsx index 37f109250a7..efb1caf0cf7 100644 --- a/public/app/features/dashboard/panel_editor/VisualizationTab.tsx +++ b/public/app/features/dashboard/panel_editor/VisualizationTab.tsx @@ -1,5 +1,5 @@ // Libraries -import React, { PureComponent } from 'react'; +import React, { PureComponent, ChangeEvent } from 'react'; // Utils & Services import { AngularComponent, getAngularLoader } from 'app/core/services/AngularLoader'; @@ -31,6 +31,7 @@ interface Props { interface State { isVizPickerOpen: boolean; searchQuery: string; + searchResults: PanelPlugin[]; scrollTop: number; } @@ -39,12 +40,13 @@ export class VisualizationTab extends PureComponent { angularOptions: AngularComponent; searchInput: HTMLElement; - constructor(props) { + constructor(props: Props) { super(props); this.state = { isVizPickerOpen: this.props.urlOpenVizPicker, searchQuery: '', + searchResults: [], scrollTop: 0, }; } @@ -170,7 +172,7 @@ export class VisualizationTab extends PureComponent { this.setState({ isVizPickerOpen: false }); }; - onSearchQueryChange = evt => { + onSearchQueryChange = (evt: ChangeEvent) => { const value = evt.target.value; this.setState({ searchQuery: value, @@ -187,7 +189,7 @@ export class VisualizationTab extends PureComponent {