Issue #2142💬 AnsweredOpened July 16, 2019by khbhr0 reactions

Drag component with its parent

Quick answerby khbhr

Hi artf, I would like to start by thanking you for the great work you've done. Second, I would like to know if there is a possible way to move a component with its parent(s) when dragging it from a cell to another? The reason why I am asking this is that I created a button block that renders a table contains a link co...

Read full answer below ↓

Question

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick SEARCH first, to see if someone else didn't open the same issueDON'T ASK to create examples/code for you, read DOCS and APIs first, then you can post what you have tried (we'd like to see your code) and what you're unable to achieveAll relative statements/questions have to be fil...

Answers (3)

khbhrJuly 16, 2019

Hi artf, I would like to start by thanking you for the great work you've done. Second, I would like to know if there is a possible way to move a component with its parent(s) when dragging it from a cell to another? The reason why I am asking this is that I created a button block that renders a tabl...

artfJuly 25, 2019

Well if you need to move the entire parent it doesn't make sense to let the user moving that component, so just make it draggable: false

<table> <tbody> <tr> <td> <a data-gjs-type="link" data-gjs-draggable="false" href="https://google.com/">Primary Button</a> </td> </tr> </tbody> </table>

Deus-XJune 26, 2024

I need to revisit this old topic. I now have the same requirement. Which in my opinion is valid. @artf If I set the component to draggable: false, I simply cannot move the component, which is not a solution. The user then does not know that the component is draggable via the parent, so it would be...

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.