nzambello / react-csv-reader

React component that handles csv file input and its parsing
https://nzambello.github.io/react-csv-reader/
MIT License
199 stars 48 forks source link

Add a name attribute to the file input #53

Closed mahesh-krishnakumar closed 3 years ago

mahesh-krishnakumar commented 3 years ago

Sometimes we would need the name attribute to the CSV file input, in cases where the file needs to be submitted using a form. So I have a scenario wherein the parsed data from the onFileLoaded callback is used to display a few information in the UI and do some basic validity checks in the attached file. However to finally submit the form, as is the norm a name attribute is necessary to be set for the file input.

nzambello commented 3 years ago

Hi @mahesh-krishnakumar Thank you for contributing May you add an entry in README parameters docs and update the tests?

mahesh-krishnakumar commented 3 years ago

I was just on it @nzambello. Sorry I missed that :)

mahesh-krishnakumar commented 3 years ago

@nzambello I have added those. Please do check. The CI for 12.x is failing because of a network time out and the runner is unable to fetch packages. The tests do pass in 10.x. Could you please try a rerun of the workflow?

mahesh-krishnakumar commented 3 years ago

Thank you @nzambello for the merge! :)

nzambello commented 3 years ago

I'll release this ASAP. Thank you!

nzambello commented 3 years ago

@mahesh-krishnakumar released in v3.2.0 https://www.npmjs.com/package/react-csv-reader/v/3.2.0

mahesh-krishnakumar commented 3 years ago

@mahesh-krishnakumar released in v3.2.0 https://www.npmjs.com/package/react-csv-reader/v/3.2.0

Thank you! 👍

mahesh-krishnakumar commented 3 years ago

@nzambello I was trying to test the change in my project after updating to the current version but was not working as intended. I was just checking this directory: https://github.com/nzambello/react-csv-reader/tree/master/dist and I see that the changes I did in src are not reflected there. Am I missing something here?