Programmatically drag another Draggable

Open
#205 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start by reviewing the Draggable component's onDragStart handling and mouse-event flow, then compare that with the react-grid-layout GridItem creation sequence described in the issue. A complete result would establish a supported way to programmatically begin dragging the new item and receive its drag-start event, with the behavior documented or covered by an existing test pattern.

Written by the indexing model from the issue text.

Description

This is my use case. I have a bar of components that the user can drag and drop to a grid(using react-grid-layout, which in turn uses react-draggable). So I'm essentially calling ondragstart on a Draggable item.

This is what is it does as of now:

  1. user drags item from topbar
  2. creates new GridItem
  3. item calls onDragStart (how?) and listens to mouse event (how?)

Anyone knows how to do this?

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-grid-layout/react-draggable

All issues in react-grid-layout/react-draggable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.