do not close on select

This commit is contained in:
Nate Kelley 2025-09-23 13:48:32 -06:00
parent 6d4f293a2f
commit 9e48e2ba51
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
1 changed files with 15 additions and 14 deletions

View File

@ -167,20 +167,21 @@ export const useDownloadMetricDataCSV = ({
const { mutateAsync: handleDownload, isPending: isDownloading } = useDownloadMetricFile();
return useMemo(
() => ({
label: 'Download as CSV',
value: 'download-csv',
icon: <Download4 />,
loading: isDownloading,
onClick: async () => {
await handleDownload({
id: metricId,
report_file_id: cacheDataId,
metric_version_number: metricVersionNumber,
});
},
}),
() =>
createDropdownItem({
label: 'Download as CSV',
value: 'download-csv',
icon: <Download4 />,
loading: isDownloading,
closeOnSelect: false,
onClick: async () => {
await handleDownload({
id: metricId,
report_file_id: cacheDataId,
metric_version_number: metricVersionNumber,
});
},
}),
[isDownloading]
);
};