Skip to content

Commit 2422ede

Browse files
authored
fix: download as csv working again (#3762)
1 parent 60884c5 commit 2422ede

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/flows/pipes/Table/view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const Table: FC<PipeProp> = ({Context}) => {
2828

2929
const dataExists = !!(results?.parsed?.table || []).length
3030

31-
const queryText = getPanelQueries(id)?.source || ''
3231
const download = () => {
3332
event('CSV Download Initiated')
34-
basic(queryText).promise.then(response => {
33+
const query = getPanelQueries(id)
34+
basic(query?.source, query?.scope).promise.then(response => {
3535
if (response.type !== 'SUCCESS') {
3636
return
3737
}

src/flows/pipes/Visualization/view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const Visualization: FC<PipeProp> = ({Context}) => {
7474

7575
const dataExists = !!(results?.parsed?.table || []).length
7676

77-
const queryText = getPanelQueries(id)?.source || ''
7877
const download = () => {
7978
event('CSV Download Initiated')
80-
basic(queryText).promise.then(response => {
79+
const query = getPanelQueries(id)
80+
basic(query?.source, query?.scope).promise.then(response => {
8181
if (response.type !== 'SUCCESS') {
8282
return
8383
}

0 commit comments

Comments
 (0)