Chore: Automatically infer types for dashgrid connected components (#29818)

* Refactor DashboardPanel

* Refactor PanelEditor

* Fix missing initializer

* Update public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* Simplify type

* Remove unused type

* Move prop connectors on top

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
Alex Khomenko
2020-12-15 13:18:40 +02:00
committed by GitHub
parent dbf0470994
commit b1a57c6f77
4 changed files with 53 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
// Libaries
// Libraries
import React, { PureComponent } from 'react';
import { hot } from 'react-hot-loader';
import ReactGridLayout, { ItemCallback } from 'react-grid-layout';
@@ -102,7 +102,7 @@ export interface Props {
}
export class DashboardGrid extends PureComponent<Props> {
private panelMap: { [id: string]: PanelModel };
private panelMap: { [id: string]: PanelModel } = {};
private panelRef: { [id: string]: HTMLElement } = {};
private eventSubs = new Subscription();