Upload.Dragger 和 react-dnd-html5-backend 共用时,拖动文件上传失效
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
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.
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>
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
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.
More from react-component/upload
-
HVAC website Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
react-component/upload#697 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 15/100
react-component/upload#615 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
react-component/upload#522 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-component/upload#515 ·
-
Clock pyrhon Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
react-component/upload#512 ·
All issues in react-component/upload
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100