useExport download is occurring even with download = false
I have a
useExport
hook with download
set to false
in my export options. It seems that the browser is still downloading the file and the trigger is not returning the data.3 Replies
Hi @geoffatsource. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The
useExport
hook in Refine has a download
property that, when set to false
, should prevent the automatic download of the CSV file in the browser. By default, this property is set to true
[^1^].
If you're experiencing an issue where the file is still being downloaded despite setting download
to false
, it might be a bug. You should consider reporting this issue to the Refine team for further investigation.
Here's an example of how you might be using the useExport
hook:
If you're expecting the triggerExport
function to return the data, please note that according to the Refine documentation, triggerExport
is an asynchronous function that starts the export process but does not return the data [^5^].
[^1^]: (https://refine.dev/docs/core/hooks/utilities/use-export#download)
[^5^]: (https://refine.dev/docs/core/hooks/utilities/use-export#return-values-1)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1014305963219615754> kapa.ai is still learning and improving, please let us know how it did by reacting below
rising-crimson•5mo ago
Hey @geoffatsource, can it be related with an outdated version? I saw your other post related with types and migration. Let us know if the issue persists even after the update 🙏