Issue #2798💬 AnsweredOpened May 24, 2020by niklasdahlback0 reactions

Parent reference in block:drag

快速解答by artf

block:drag can't contain the reference to the component as it's not yet created before being dropped

Read full answer below ↓

Question

I wonder if it is possible to get the parent and/or index during block:drag event for the resulting component, similar to the parent attribute in the component:drag event? It seems like the event argument passed does not contain any reference to parent. The reason I am asking is that I am working on a solution to preview the presumed drop result of a dragged block, using a box rather than the green line indicating the drop position.

Answers (1)

artfJune 12, 2020

block:drag can't contain the reference to the component as it's not yet created before being dropped

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.