Skip to content

fix(useFileUpload): keep dropzone type filter reactive to accept#260

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-000aba4
Jul 10, 2026
Merged

fix(useFileUpload): keep dropzone type filter reactive to accept#260
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-000aba4

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Syncs upstream nuxt/ui commit 000aba4fix(useFileUpload): keep dropzone type filter reactive to accept (#6699).

What

useFileUpload passed dataTypes.value — a static snapshot — to useDropZone, so the dropzone MIME filter stopped tracking accept changes after mount. The fix passes the computed dataTypes ref directly so the filter stays reactive.

  • parseAcceptToDataTypes now returns [] instead of undefined for unrestricted input (an empty list means "no restriction" for useDropZone), and dataTypes is typed readonly string[].
  • b24ui's composable matched upstream exactly, so the three changes applied verbatim.
  • Added the upstream test/composables/useFileUpload.spec.ts (composable-only; import paths are identical in b24ui) — covering drop/dialog forwarding, isDragging, accept-parsing, the reactivity regression, the dropzone: false path, and exposed refs.

Verify (CI=true)

dev:prepare · lint · typecheck · test · build — all green. Suite 5341 passed / 6 skipped (+2 test files, 227→229). No snapshot changes.

Ledger: cursor advanced to 000aba4; previous entry 2128414 reconciled to PR #259.

🤖 Generated with Claude Code


Generated by Claude Code

…aba4)

useFileUpload passed dataTypes.value (a static snapshot) to useDropZone,
so the dropzone MIME filter stopped tracking accept changes. Pass the
computed dataTypes ref directly; parseAcceptToDataTypes now returns []
(no restriction) instead of undefined. Adds the upstream useFileUpload
composable spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik IgorShevchik merged commit 0651f57 into main Jul 10, 2026
1 check passed
@IgorShevchik IgorShevchik deleted the sync/nuxt-000aba4 branch July 10, 2026 14:47
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.

2 participants