Restrict Droppable Components to specific Component Types
Question
So the wording of this may seem confusing, but essentially I'm trying to use gjs-droppable="" the same way one would use gjs-draggable="".
So if gjs-droppable="li.feature" was set on <ul>, then only items matching the selector could be dropped within the <ul>.
Answers (2)
This already works as detailed above, I just had an error in my code originally preventing it from working correctly!
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.
Issue #1428
[Question] Define or hide properties for specific components
Hi, I'm wondering if there is the possibility to define properties for specific components. I mean, when I select the component Image I wou...
Issue #1481
Component.remove() gets called on drag and on trash
There is no way currently to distinguish between remove() called on component when you are dragging it. And when you pres the trash button....
Issue #484
Can I restrict what blocks that can be dropped into a container
My intent is to create a block that should allow only image components (I'm using the default one from grapes-blocks-basic) to be dropped i...
Issue #577
Only allow one component of specific type on editor
is there way to not allow to drop any specific component more than one time on page? I have custom component and user cannot drop it more t...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.