Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont wait for whole CSV file to get parsed #229

Open
rajkumarwaghmare opened this issue Jun 3, 2024 · 1 comment
Open

Dont wait for whole CSV file to get parsed #229

rajkumarwaghmare opened this issue Jun 3, 2024 · 1 comment

Comments

@rajkumarwaghmare
Copy link

rajkumarwaghmare commented Jun 3, 2024

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 Successful message 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 display Import Successful message only after the data is really "imported" and not just parsed.

Proposed changes

      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;
              }
@rajkumarwaghmare
Copy link
Author

Submitted a PR here
#230

@rajkumarwaghmare rajkumarwaghmare changed the title Dont wait for whole CVS file to get parsed Dont wait for whole CSV file to get parsed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant