react-component / react-component/tree
Draggable option does not allow drop
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 490
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 5
Description
Reproduction link
https://stackblitz.com/edit/react-tcimgg-lpxvkv?file=index.js
Steps to reproduce
Just drag the draggable-child to non-draggable-child. You will see, that even allowDrop is true, the non-draggable-child does not allow drop in itself.
What is expected?
Non draggable elements must not prevent dropping, as this logic is related to allowDrop function
What is actually happening?
If draggble returns false, the allowDrop is somehow ignored and the element can never have a child to be dropped in it
| Environment | Info |
|---|---|
| antd | 4.15.4 |
| React | 17.0.2 |
| System | Windows 10 19042.985 |
| Browser | Chrome 90.0.4430.212 (Latest) |
Documentation states: "draggable Specifies whether this Tree or the node is draggable (IE > 8)", and nothing about dropping, so why it's prohibited?
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 by running the linked StackBlitz reproduction and inspect the tree's drag-and-drop handling for the interaction between draggable and allowDrop. Trace why a non-draggable child rejects a drop even when allowDrop is true. Done means the reproduced drop succeeds without breaking normal draggable behavior, with a regression test added in the existing test location if one covers this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100