Skip to content

Commit

Permalink
Merge pull request #1047 from visualize-admin/fix/full-dataset-download
Browse files Browse the repository at this point in the history
fix: Download full dataset
  • Loading branch information
bprusinowski authored Jun 1, 2023
2 parents 25d186e + dd3f0d8 commit 904f618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion app/components/chart-footnotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export const ChartFootnotes = ({
dataSetIri={dataSetIri}
dataSource={dataSource}
title={dataCubeByIri.title}
componentIris={componentIrisToFilterBy}
filters={filters}
/>
) : null}
Expand Down
16 changes: 2 additions & 14 deletions app/components/data-download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,11 @@ export const DataDownloadMenu = memo(
dataSetIri,
dataSource,
filters,
componentIris,
title,
}: {
dataSetIri: string;
dataSource: DataSource;
filters?: QueryFilters;
componentIris?: string[];
title: string;
}) => {
return (
Expand All @@ -147,7 +145,6 @@ export const DataDownloadMenu = memo(
dataSetIri={dataSetIri}
dataSource={dataSource}
fileName={title}
componentIris={componentIris}
filters={filters}
/>
</DataDownloadStateProvider>
Expand All @@ -159,13 +156,11 @@ const DataDownloadInnerMenu = ({
dataSetIri,
dataSource,
fileName,
componentIris,
filters,
}: {
dataSetIri: string;
dataSource: DataSource;
fileName: string;
componentIris?: string[];
filters?: QueryFilters;
}) => {
const [state] = useDataDownloadState();
Expand Down Expand Up @@ -212,7 +207,6 @@ const DataDownloadInnerMenu = ({
<Trans id="button.download.data.visible">Chart dataset</Trans>
}
fileName={fileName}
componentIris={componentIris}
filters={filters}
/>
)}
Expand All @@ -221,7 +215,6 @@ const DataDownloadInnerMenu = ({
dataSource={dataSource}
subheader={<Trans id="button.download.data.all">Full dataset</Trans>}
fileName={fileName}
componentIris={componentIris}
/>
{state.error && (
<RawMenuItem>
Expand All @@ -240,14 +233,12 @@ const DataDownloadMenuSection = ({
dataSource,
subheader,
fileName,
componentIris,
filters,
}: {
dataSetIri: string;
dataSource: DataSource;
subheader: ReactNode;
fileName: string;
componentIris?: string[];
filters?: QueryFilters;
}) => {
return (
Expand All @@ -264,7 +255,6 @@ const DataDownloadMenuSection = ({
dataSource={dataSource}
fileName={fileName}
fileFormat={fileFormat}
componentIris={componentIris}
filters={filters}
/>
))}
Expand All @@ -279,14 +269,12 @@ const DownloadMenuItem = ({
dataSource,
fileName,
fileFormat,
componentIris,
filters,
}: {
dataSetIri: string;
dataSource: DataSource;
fileName: string;
fileFormat: FileFormat;
componentIris?: string[];
filters?: QueryFilters;
}) => {
const locale = useLocale();
Expand Down Expand Up @@ -345,7 +333,7 @@ const DownloadMenuItem = ({
sourceType: dataSource.type,
sourceUrl: dataSource.url,
locale,
componentIris,
componentIris: undefined,
}
)
.toPromise();
Expand All @@ -359,7 +347,7 @@ const DownloadMenuItem = ({
sourceType: dataSource.type,
sourceUrl: dataSource.url,
locale,
componentIris,
componentIris: undefined,
filters,
})
.toPromise();
Expand Down

1 comment on commit 904f618

@vercel
Copy link

@vercel vercel bot commented on 904f618 Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

visualization-tool – ./

visualization-tool-alpha.vercel.app
visualization-tool-git-main-ixt1.vercel.app
visualization-tool-ixt1.vercel.app

Please sign in to comment.