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

onPageChange

Open jb-modist opened this issue 3 years ago • 2 comments
trafficstars

We have a scenario where during field selection there may be extra fields. The standard import uses Image Url but in some cases there are multiple, We handle this by having Image Url 1, Image Url 2.... Image Url N in the import file

However, this creates a problem in the mapping, since we now need to map these multiple columns.

To this end in the field selection screen we add a button to change the column definitions, to facilitate this, we need to know when we're looking at the field selection screen,

Please can you add an onPageChange optional callback? Please see attached patch file

react-csv-importer+0.7.1.txt

jb-modist avatar Aug 11 '22 14:08 jb-modist

Thanks for the patch! For your use case it might be simpler to pass the current step as a value to the children render prop of the importer component?

unframework avatar Feb 23 '23 21:02 unframework

Yes, that would also work

jb-modist avatar Feb 27 '23 10:02 jb-modist