craft.js icon indicating copy to clipboard operation
craft.js copied to clipboard

Is there a way to detect when a child component is incoming into a parent container?

Open raphkhan opened this issue 3 years ago • 3 comments

Hi, to improve the UX of the drag & drop, I want to change my container's color when I drag an incoming component into it.

Is there a way to detect when a child component is incoming into a parent container?

Thanks for your answers

raphkhan avatar Feb 11 '21 14:02 raphkhan

Currently not, but there is my Draft PR #37 that aims to add that functionality. I just need to find some time to finish it.

ankri avatar Feb 11 '21 15:02 ankri

@raphkhan I was wondering the same the other day, then I noticed that the DOM changed on dragOver. I think that for the time being you can change the styles using the CSS class "draggedOver"

hugominas avatar Feb 18 '21 10:02 hugominas

Same issue here: https://github.com/prevwong/craft.js/issues/124

lost-valley avatar Mar 30 '22 15:03 lost-valley