react-papaparse icon indicating copy to clipboard operation
react-papaparse copied to clipboard

CSVReader onRemoveFile

Open mperone opened this issue 3 years ago • 2 comments

I can't seem to figure out from the docs and source code how to handle the old onRemoveFile behavior for CSVReader. I only see onUploadAccepted (can use to replace my old code for onDrop) and onUploadRejected (can use to replace my old code for onError). How can I run my own logic when the file is removed?

mperone avatar Aug 27 '22 00:08 mperone

In case you didn't find this solution, here's something that works

{...getRemoveFileProps()}
onClick={(event: Event) => {
    getRemoveFileProps().onClick(event);
    // Your code here
}

JamesIV4 avatar Oct 31 '23 17:10 JamesIV4

Thanks, will check it out!

mperone avatar Oct 31 '23 17:10 mperone