Custom importer function
enricodeleo opened this issue · comments
Enrico Deleo commented
Is it possible to inject a custom importer function the same way we do for exporter
?
Ben Winding commented
Hi @enricodeleo,
What do you mean by exporter? We have the following options available to use:
const config: ImportConfig = {
// A function to translate the CSV rows on import
preCommitCallback?: (action: "create" | "overwrite", values: any[]) => any[];
// A function to handle row errors after import
postCommitCallback?: ([]) => any[];
}
<ImportButton {...props} {...config}/>
Any other functionality, you're better off manipulating your dataprovider.
Cheers,
Ben
Enrico Deleo commented
Thanks for your reply @benwinding