Hi everyone !
I am trying to allow my users to download the filtered content of the dataset on their member’s page into a CSV file. I already managed to code the conversion of the content into a CSV string, now I would like to set up the behavior of a button that would would create a CSV file out of this string, and then download a CSV file when clicked.
Any idea ? i also thought of using an API that would send the file by email in the end, however I can’t find a proper API for that.
@jonatandor35 Hey thank you so much for your answer Apparently, there might be a little problem in the custom element’s code as the button is not rendering on preview. On live site, I have the following error in the console :
Error: failed to load custom element corvid file with url: https://bundler.wix-code.com/6516b74f-3cf2-4c47-be56-52968edc7f7a/98d7a743-946c-4b92-b91b-b49ef88827d8/bab3af1d-a1f1-4008-803f-55219004c9f7/custom-elements/download-function?no-umd=true&wix-data-as-namespace=true&replace-console=true
at l (wixCustomElementComponent.dce6ce7e.chunk.min.js:1:1228)
at async Promise.all (index 0)
at async Object.pageWillMount (wixCustomElementComponent.dce6ce7e.chunk.min.js:1:707)
at async t (bootstrap-features.2a7d7fd1.bundle.min.js:6:76761)
at async Promise.all (index 23)
at async bootstrap-features.2a7d7fd1.bundle.min.js:6:76932
at async Promise.all (index 0)
at async initPage (bootstrap-features.2a7d7fd1.bundle.min.js:6:77017)
at async bootstrap-features.2a7d7fd1.bundle.min.js:6:101769
at async Object.N [as navigate] (bootstrap-features.2a7d7fd1.bundle.min.js:6:101655)