You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to make forbidden the drop of one block before another specific one.
Context : i've create a new trait for some blocks to set them as "page header", and I don't want to allow the drag&drop one block before this "page header" as it must be the first block of my template.
I saw I could listen sorter:drag:validation event and update the valid property to false in this perspective. But I can't known the future order of the block I would drop.
So, I would be glad to know one solution to this problem.
Thanks in advance :)
The text was updated successfully, but these errors were encountered:
Hello,
Thx for your response but it's not my use case.
I don't want to disable a block drag'n'drop on all the canvas, but I jus want this block to not to be added before another specific component.
You can see if you're able to achieve it with by using the draggable property (Component) or make use of block:drag:stop event to ensure if the dropped component meets the necessary criteria and remove it if it doesn't
Hello everyone,
I would like to make forbidden the drop of one block before another specific one.
Context : i've create a new trait for some blocks to set them as "page header", and I don't want to allow the drag&drop one block before this "page header" as it must be the first block of my template.
I saw I could listen sorter:drag:validation event and update the valid property to false in this perspective. But I can't known the future order of the block I would drop.
So, I would be glad to know one solution to this problem.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: