Skip to content

Commit 3dc3ecd

Browse files
authored
[AJ-1850] Show spinner while downloading a TSV (#4842)
1 parent b0a21e3 commit 3dc3ecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/workspace-data/Data.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ const DataTableActions = ({
355355
downloadForm.current.submit();
356356
} else if (dataProvider.features.supportsTsvAjaxDownload) {
357357
// TODO: this overrides the filename specified by the WDS API. Is that ok?
358-
dataProvider.downloadTsv(signal, tableName).then((blob) => FileSaver.saveAs(blob, `${tableName}.tsv`));
358+
Utils.withBusyState(setLoading, dataProvider.downloadTsv)(signal, tableName).then((blob) =>
359+
FileSaver.saveAs(blob, `${tableName}.tsv`)
360+
);
359361
}
360362
Ajax().Metrics.captureEvent(Events.workspaceDataDownload, {
361363
...extractWorkspaceDetails(workspace.workspace),

0 commit comments

Comments
 (0)