react-csv-downloader icon indicating copy to clipboard operation
react-csv-downloader copied to clipboard

Accept undefined or null in the data attribute, and not process the csv in these cases.

Open rodrigotavio91 opened this issue 2 years ago • 0 comments

I'm passing the data to the CsvDownloader component through an async function that fetches the data remotely. However, if I got an error from the server while fetching the data, I don't have anything to return to the component, so it returns undefined, and it gives an error on the CsvDownloader component.

It would be great if it accepts undefined to mean that we don't want to process the csv.

Thank you.

rodrigotavio91 avatar Jan 05 '22 13:01 rodrigotavio91