Bunlong / react-papaparse

react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
https://react-papaparse.js.org
MIT License
363 stars 60 forks source link

BUG: meta field is returning an empty array #128

Open Smahrt opened 2 years ago

Smahrt commented 2 years ago

I'm replicating the example for drag and drop + click upload on the readme and the meta field returns an empty array even when I specify <CSVReader config={{ header: true }} ...

Version: react-papaparse: 4.0.2

Output (console):

image
Kasi1294 commented 2 years ago

Same for me

1) Whene I read csv file without config's - complete callback method

image

Result : image

2) When I use config's - complete callback method image

Result: image

My Observation: 1) When I config's - complete callback method it is called before parsing the data itself 2) onUploadAccepted is not calling

Kindly help me reg this If possible give the working code(I am new to react)

aalbrighti2p commented 1 year ago

I am seeing the same result. The 'meta' property of 1st parameter in onUploadAccepted callback is returning as an empty array.

my config prop { header: true, skipEmptyLines: true, dynamicTyping: true, }

mkotar commented 1 year ago

The bug is still present. Even if you use demo examples, you get an empty meta. Any suggested time for the fix?