react-csv-importer
react-csv-importer copied to clipboard
onPageChange
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
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?
Yes, that would also work