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

OnComplete Showing Upload More instead of Finish

Open dymyll opened this issue 3 years ago • 1 comments
trafficstars

Hello, I am trying to use the Importer library and all is well, however, I noticed when using the onComplete and onClose while setting the restartable attribute to true. The button for onClose will show "Upload More" instead of "Finish". I am sure this is a minor bug, but I cannot locate where to fix the issue?

Expecting to see: Upload More and Finish

<Importer assumeNoHeaders={false} restartable={true} onStart={({ file, preview, fields, columnFields }) => { setFile(file); }} processChunk={async (rows, { startIndex }) => { for (let row of rows) { console.log("Row: ", row) } }} onComplete={({ file, preview, fields, columnFields }) => { if (file) { // Do something with file } }} onClose={({ file, preview, fields, columnFields }) => { //goToMyAppNextPage(); }} escapeChar={true} skipEmptyLines={true} > <ImporterField name="name" label="Name" /> <ImporterField name="columna" label="COLUMN A" optional /> <ImporterField name="columnb" label="COLUMN B" optional /> </Importer>

Screen Shot 2022-07-08 at 11 26 41 AM

dymyll avatar Jul 08 '22 16:07 dymyll

Hi Dymyll, thanks for reporting this - I just checked and was able to reproduce the issue. Will merge a fix very shortly, might be a bit longer to publish a new version though.

unframework avatar Jul 13 '22 17:07 unframework

Released the fix in v0.8.0.

unframework avatar Dec 29 '22 21:12 unframework