diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index fe297e56ab3..bd4be25d8d5 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -62,19 +62,19 @@ function ExportMenuItem({ return ( { - let action = item.action; - if (item.route) { - action = async () => { - const { data } = await request(item.route!); - return data ?? null; - }; - } - if (action) { + if (item.action) { + let action = item.action; + if (item.route) { + action = async () => { + const { data } = await request(item.route!); + return data ?? null; + }; + } exportFile(action, item.filePrefix, item.type, item.parse); + } else if (item.options?.onClick) { + item.options.onClick(); } }} - disabled={item.options?.disabled || !isAuthorized} - id={item.options?.id} className={item.options?.className} >