Issue #1409💬 AnsweredOpened September 7, 2018by YashPrince0 reactions

Component Drag Event

Quick answerby artf

In your case, I think it would be better listen to inner components changes (eg. what if I delete all children components?), but currently, there is no such an event, so I'll try to add it for the next release. It should be something like this

Read full answer below ↓

Question

I want to know how can I get that component from which element is dragged and drop to the other component. I need to add a class if component become empty if element is dragged and droped to the outside element. I can get the component which dragged and in which it droped but not from where it dragged. Any Help would be appreciated.

dragevent

Answers (3)

artfSeptember 11, 2018

In your case, I think it would be better listen to inner components changes (eg. what if I delete all children components?), but currently, there is no such an event, so I'll try to add it for the next release. It should be something like this

sakshigarg9March 25, 2019

@YashPrince how did you get the id of the dragged component and where it was dropped

lock[bot]March 27, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.