diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index 6bcf69f..d1896d1 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -109,7 +109,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { setQueriesDataFrame(getDataFrameForQueriesTable(queries)); }, [queries]); // eslint-disable-line react-hooks/exhaustive-deps - async function updateQueries(dashboard: Dashboard | null, datasources: DataSourceSettings[] | null): Promise { + async function updateQueries(): Promise { if (!dashboard || !datasources) { console.warn(`Can't update queries if there is no dashboard or datasources`); return; @@ -213,8 +213,8 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { setQueries(queries.map((query: DashboardQuery) => ({ ...query, selected: false }))); } - function openDatasourceModal(dashboard: Dashboard | null, datasources: DataSourceSettings[] | null): void { - updateQueries(dashboard, datasources); + function openDatasourceModal(): void { + updateQueries(); setTimeRange(timeRange); setModalVisibility(true); } @@ -441,7 +441,7 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { aria-label="Rich history button" icon="plus" style={{ marginTop: '8px' }} - onClick={() => openDatasourceModal(dashboard, datasources)} + onClick={openDatasourceModal} > Add Task