benwinding / react-admin-import-csv

A csv file import button for react-admin

Home Page:https://benwinding.github.io/react-admin-import-csv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with the resource post count when importing records

vinodphadtare opened this issue · comments

When I tried to import records using demo app with this CSV
posts.csv

Although CSV contains 4 records but message is display as 5 records.
incorrect-row-count

After clicking on "Let me decide for each row" count is displayed correct.

I tried to debug this issue, I am not sure why we are adding +1 for conflicting ids length

file: src/components/import-csv-dialog-strategy.tsx
line 66:
conflictingCount: idsConflicting && idsConflicting.length + 1,

please suggest.

Hi @vinodphadtare,
Thanks again for reporting the issue, yes it looks like this was a mistake, the +1 is not required. This change will be available in version 1.0.19.
Cheers,
Ben