Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Download full dataset #1047

Merged
merged 3 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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