Belphemur / vue-json-csv

VueJS component to export Json Data into CSV file and download the resulting file.
MIT License
124 stars 27 forks source link

Not an issue as such but a feature implementation #58

Open AlexisFinn opened 3 years ago

AlexisFinn commented 3 years ago

Hello.

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

Thank you.

charlesgourdin commented 3 years ago

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

AlexisFinn commented 3 years ago

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 commented 3 years ago

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.

sonphnt commented 2 years ago

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

dolanwill commented 2 years ago

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

claytonNighthawk commented 1 year ago

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!