-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Why this change is needed?
- In case of very large files, waiting time for parsing to finish is considerably long.
- Instead, just complete the CSV headers to key mapping and return the mapping. This will fasten the process and reduce the waiting time
- Also,
Import Successfulmessage is displayed too early and this wording will confuse user in thinking that the actual CSV file has been mapped, parsed and uploaded/imported. So we need some mechanism where we displayImport Successfulmessage only after the data is really "imported" and not just parsed.
Proposed changes
- Addition of
onCSVHeadersMapped?: (data: any) => Promise<void>;toCSVImporterProps - Addition of below logic in
case StepEnum.MapColumns:success callback
case StepEnum.MapColumns:
return (
<MapColumns
template={parsedTemplate}
data={data}
columnMapping={columnMapping}
skipHeaderRowSelection={skipHeader}
selectedHeaderRow={selectedHeaderRow}
onSuccess={(columnMapping) => {
setIsSubmitting(true);
setColumnMapping(columnMapping);
if (onCSVHeadersMapped) {
onCSVHeadersMapped(columnMapping).then(() => {
setIsSubmitting(false);
goNext();
});
return;
}
Metadata
Metadata
Assignees
Labels
No labels