mirror of https://github.com/buster-so/buster.git
do not close on select
This commit is contained in:
parent
6d4f293a2f
commit
9e48e2ba51
|
@ -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]
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue