Skip to content

preCommitCallback running to late #51

@fkowal

Description

@fkowal

Hi

I wanted to discuss an issue i ran into to hopefully find a solution

The issue is that the preCommitCallback is called to late in the pipeline

My business case is that Business guy goes to react-admin exports an CSV
fills out some missing information in 1 column and the imports the data back into the system

ie. He export 1000 rows, he fills only 50 and the uses the import CSV

So during import id like the pipeline to looks like

parseCSV -> preCommitCallback -> collisionDetection ....

With the currency pipeline
parseCSV -> collsionDetection -> ... -> very end preCommitCallback

The Override/replace Modal shows 950 rows that are going to be ignored

My suggestion would be

  1. add a config: {transform?: (csvRows[]) => csvRows[]) and invoke this right after GetCSVItems
  2. move th preCommitCallback invocation from being the last step to right after GetCSVItems

Adding this transformation after GetCsvItems would also greatly limits the data fetched/send to GetIdsColliding

I am also open to hearing other ideas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions