vue-json-csv icon indicating copy to clipboard operation
vue-json-csv copied to clipboard

Not an issue as such but a feature implementation

Open AlexisFinn opened this issue 4 years ago • 6 comments

Hello.

Is there any way to use this asyncronously ? My use case is:

  • when the user clicks Dowload I neet to first retrieve the data from the server before exporting it.

Thank you.

AlexisFinn avatar Jan 27 '21 08:01 AlexisFinn

I had the same problem and there is how I bypassed it... I don't display the download-csv tag and simulate a click on it after fetching the data with another button.

carbon

charlesgourdin avatar Feb 11 '21 08:02 charlesgourdin

Nice, thank you. I ended up dropping this vuejs plugin in favor of a custom solution using papaparse and a bunch of async calls (the amount of data can be quite large, so I actually have to make several paginated requests to retrieve everything).

But nice solution.

AlexisFinn avatar Feb 11 '21 10:02 AlexisFinn

leaving this open as I feel this would be a nice feature to have a url parameter that would then retrieve the data from given url asyncronously, with a little progress bar maybe.

Up to the maintainers to close this if they feel it's too much trouble.

AlexisFinn avatar Feb 11 '21 10:02 AlexisFinn

Is it better to write a composition api that we can call at any time we want? and we dont actually need a component. We can make a button by ourselves with @click event that will trigger a csv export function with composition api way

sonphnt avatar Apr 12 '22 12:04 sonphnt

it would be great to have this as using $refs to specify the JsonCSV component is a bit of an antipattern

dolanwill avatar Sep 22 '22 16:09 dolanwill

I had the same problem and there is how I bypassed it... I don't display the download-csv tag and simulate a click on it after fetching the data with another button.

carbon

This worked wonderfully, thank you!

claytonNighthawk avatar Jun 28 '23 16:06 claytonNighthawk