diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index 17f9e73..1af10d9 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -1,5 +1,4 @@ import { PanelOptions, TaskTableRowConfig, QueryTableRowConfig, DatasourceType } from '../types'; -import { css } from '@emotion/css'; import { convertTimestampToDate, getDashboardUid } from '../../../utils'; import { CLOSE_ICON_BASE_64, DOWNLOAD_ICON_BASE_64, SELECT_ICON_BASE_64, UNSELECT_ICON_BASE_64 } from '../../../icons'; @@ -8,6 +7,7 @@ import { deleteTask, getStaticFile, getTasks, queryApi } from '../../../services import { getDashboardByUid, getDatasources } from '../../../services/grafana_backend_service'; import { contextSrv } from 'grafana/app/core/core'; +import { css } from '@emotion/css'; import { Table, @@ -103,10 +103,10 @@ export function Panel({ width, height, timeRange, eventBus }: Props) { }, [dashboard, datasources]); // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { - // if (tasks === null) { - // return; - // } - const dataFrame = getDataFrameForTaskTable([]); + if (tasks === null) { + return; + } + const dataFrame = getDataFrameForTaskTable(tasks); setTasksDataFrame(dataFrame); }, [tasks]); // eslint-disable-line react-hooks/exhaustive-deps