You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
I have installed v0.8.1
When I try to send data to the database inside the dataHandler function, all my functions run twice, leading to incorrect results:
console log:
My code:
<Importer
dataHandler={async (rows) => {
console.log(
"🚀 ~ file: AddFromCsvTab.tsx:88 ~ dataHandler={ ~ rows:",
rows
);
const data = await createList.mutateAsync({
orgId: curUser?.current_org_id!,
addedByUserId: curUser?.cur_user_id!,
listName: newListName!,
});
rows.forEach((row) => {
addContactToNewList.mutate({
addedByUserId: curUser?.user_id!,
orgId: curUser?.current_org_id!,
listId: data.listId,
...(row as CsvContactInfo),
});
});
}}
defaultNoHeader={false} // optional, keeps "data has headers" checkbox off by default
restartable={true} // optional, lets user choose to upload another file when import is complete
locale={enUS}
skipEmptyLines={true}
>
<ImporterField name="firstName" label="First Name" />
<ImporterField name="lastName" label="Last Name" />
<ImporterField name="email" label="Email" />
<ImporterField name="notes" label="Info" />
</Importer>
Still have a problem like in this issue.
I have installed v0.8.1
When I try to send data to the database inside the dataHandler function, all my functions run twice, leading to incorrect results:
console log:
My code:
My CSV file: List.csv
The text was updated successfully, but these errors were encountered: