Possibility of trigger eventCallback 'onStart' or setState 'dragging' of Draggable JSX-element?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
The issue names the Draggable JSX element, its onStart prop, and internal dragging state, but no repository files or tests. Start by locating the Draggable component and tracing how mounting and drag-start are handled; done means an agreed supported path for creating the card at the cursor and retaining or removing it after drop.
Written by the indexing model from the issue text.
Description
The situation
I want to generate a new component (a new card) over some drag-and-drop-function.
The plan: If the user start to drag from a button at the sidebar, a new draggable component should appear at his cursor. If he drop this component at a drop-zone, the component should be stay at that point. At other zones the component disappear.
And before you ask: To use the cursor-css-styles cannot work for me, they block all other mouse-events. They are important to adjust the new card.
The plan
The dragging-action is already in progress when the Draggable-component is mounted. She cannot trigger the onStart={} event by her own.
Because of this problem I search for a way to trigger the synthetic event onStart={} manually. What a real challenge is there is no way to get the JSX-element from the DOM. At least I didn't find any. Another way would be to modify the dragging-state from the Draggable component:
dragged:true
dragging:false
isElementSVG:false
prevPropsPosition:{x: 0, y: 0}
slackX:0
slackY:0
x:0
y:0
To add the class react-draggable-dragging did not work, i tried it already.
The question
Is there a way to set the dragging-state manually? Or is there a way I didn't see to bind the element at the cursor, directly after mounting?
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 4
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-grid-layout/react-draggable
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-grid-layout/react-draggable#784 · 4 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
react-grid-layout/react-draggable#782 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
react-grid-layout/react-draggable#781 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-grid-layout/react-draggable#780 · 8 comments ·
All issues in react-grid-layout/react-draggable
Similar issues
-
Edit: CW+ Openchannels:edit check:passed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
idean3885/claude-ops-agent#521 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100