react-component / react-component/upload
Upload.Dragger 和 react-dnd-html5-backend 共用时,拖动文件上传失效
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
my solution:
https://github.com/react-component/upload/blob/e0c50a096054fafd24c3c14b250576f25e968c88/src/AjaxUploader.jsx#L64-L68
add: e.stopPropagation()
onFileDrop = e => {
e.stopPropagation();
e.preventDefault();
or add a wrapper:
<div onDrop={e => e.stopPropagation()}>
<Upload.Dragger {...props}>...</Upload.Dragger>
</div>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/AjaxUploader.jsx at lines 64-68, especially the onFileDrop entry point, and reproduce the failure with Upload.Dragger used alongside react-dnd-html5-backend. Compare the reported stopPropagation workaround with the wrapper workaround, then verify that dragging files still uploads correctly when both components are used together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100