Skip to content

fix(core): skip empty lines by default in useImport (#7615) - #7636

Open
hiteshchoudhary738-alt wants to merge 875 commits into
refinedev:masterfrom
hiteshchoudhary738-alt:fix/useImport-csv-empty-line-break
Open

hiteshchoudhary738-alt wants to merge 875 commits into
refinedev:masterfrom
hiteshchoudhary738-alt:fix/useImport-csv-empty-line-break

Conversation

@hiteshchoudhary738-alt

@hiteshchoudhary738-alt hiteshchoudhary738-alt commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

When importing a CSV file that ends with a trailing line break or newline, Papa Parse treated the final line as an extra record because skipEmptyLines was not configured (defaulting to alse). This caused useImport to send an unintended empty record to create / createMany.

What is the new behavior?

skipEmptyLines: true is now passed by default in useImport's papaparse.parse config, ensuring trailing line breaks and empty rows are skipped during import, while still permitting consumer overrides through paparseOptions.

fixes #7615

Notes for reviewers

  • Added unit test in packages/core/src/hooks/import/index.spec.tsx verifying default skipEmptyLines: true.
  • Added changeset for patch release of @refinedev/core.

alicanerdurmaz and others added 30 commits January 27, 2026 14:15
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Batuhan Wilhelm <batuhanwilhelm@gmail.com>
DoguhanOzgurAkca and others added 28 commits April 9, 2026 15:20
- Code Comments: change duplicate h1 to h2 with new text
- React 18: demote all h1 headings to h2
- URI vs URL: demote extra h1 to h2
- HTMX: demote extra h1 headings to h2
docs: update robots.txt to disallow old versioned docs and fix sitema…
docs(blog): new headless strapi blog
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…v#7426)

Co-authored-by: DAL\Administrator <3452720699@qq.com>
Co-authored-by: Batuhan Wilhelm <batuhanwilhelm@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Batuhan Wilhelm <batuhanwilhelm@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 33144b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 66 packages
Name Type
@refinedev/core Patch
@refinedev/react-hook-form Major
@refinedev/chakra-ui Patch
@refinedev/inferencer Patch
@refinedev/live-previews Patch
@refinedev/mui Patch
@refinedev/refine-ui Patch
audit-log-provider Patch
auth-chakra-ui Patch
auth-headless Patch
auth-material-ui Patch
base-chakra-ui Patch
base-headless Patch
base-material-ui Patch
customization-theme-chakra-ui Patch
customization-theme-material-ui Patch
field-material-ui-use-autocomplete Patch
finefoods-material-ui Patch
form-chakra-ui-mutation-mode Patch
form-chakra-ui-use-drawer-form Patch
form-chakra-ui-use-form Patch
form-chakra-use-modal-form Patch
form-core-use-form Patch
form-material-ui-mutation-mode Patch
form-material-ui-use-drawer-form Patch
form-material-ui-use-form Patch
form-material-ui-use-modal-form Patch
form-material-ui-use-steps-form Patch
form-react-hook-form-use-form Patch
form-react-hook-form-use-modal-form Patch
form-react-hook-form-use-steps-form Patch
import-export-material-ui Patch
inferencer-chakra-ui Patch
inferencer-headless Patch
inferencer-material-ui Patch
refine-hr-ce Patch
server-side-form-validation-chakra-ui Patch
server-side-form-validation-material-ui Patch
table-chakra-ui-advanced Patch
table-chakra-ui-basic Patch
table-material-ui-advanced Patch
table-material-ui-data-grid-pro Patch
table-material-ui-table-filter Patch
table-material-ui-use-data-grid Patch
table-material-ui-use-delete-many Patch
table-material-ui-use-update-many Patch
table-react-table-advanced Patch
template-chakra-ui Patch
template-headless Patch
template-material-ui Patch
theme-chakra-ui-demo Patch
theme-material-ui-demo Patch
tutorial-chakra-ui Patch
tutorial-headless Patch
tutorial-material-ui Patch
upload-chakra-ui-basic64 Patch
upload-chakra-ui-multipart Patch
upload-material-ui-base64 Patch
upload-material-ui-multipart Patch
use-infinite-list Patch
win95 Patch
with-material-ui-vite Patch
with-persist-query Patch
with-react-toastify Patch
with-remix-headless Patch
with-remix-vite-headless Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hiteshchoudhary738-alt hiteshchoudhary738-alt changed the title Fix/use import csv empty line break fix(core): skip empty lines by default in useImport (#7615) Oct 20, 2026

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.