Skip to content

Commit

Permalink
Tweak doQueryExport
Browse files Browse the repository at this point in the history
  • Loading branch information
alesan99 committed Oct 28, 2024
1 parent 495588e commit 8501fec
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export function QueryExportButtons({

function doQueryExport(
url: string,
selectedRows: ReadonlySet<number> | undefined,
delimiter: string | undefined,
bom: boolean | undefined
bom: boolean | undefined,
selectedRows: ReadonlySet<number> | undefined
): void {
if (typeof getQueryFieldRecords === 'function')
queryResource.set('fields', getQueryFieldRecords());
Expand All @@ -71,7 +71,7 @@ export function QueryExportButtons({
generateMappingPathPreview(baseTableName, mappingPath)
),
recordSetId,
selectedRows: selectedRows ? Array.from(selectedRows) : undefined,
selectedRows: selectedRows !== undefined ? Array.from(selectedRows) : undefined,
delimiter,
bom,
}),
Expand Down Expand Up @@ -163,9 +163,9 @@ export function QueryExportButtons({
selectedRows.size === 0
? doQueryExport(
'/stored_query/exportcsv/',
undefined,
separator,
utf8Bom
utf8Bom,
undefined
)
: exportCsvSelected().catch(softFail);
}}
Expand All @@ -181,9 +181,9 @@ export function QueryExportButtons({
hasLocalityColumns(fields)
? doQueryExport(
'/stored_query/exportkml/',
selectedRows.size === 0 ? undefined : selectedRows,
undefined,
undefined
undefined,
selectedRows.size === 0 ? undefined : selectedRows
)
: setState('warning')
}
Expand Down

0 comments on commit 8501fec

Please sign in to comment.