Description
I have a use case where I want to limit the draggable area for items in a list.
Let's say I have a menu button in each item in the list, I should be able to drag the items from menu button only not the whole item.Here's a sandbox example
SandboxThanks
did you find solution?
No I didn't find the solution
No I didn't find the solution
Thats sad that community doesnt聽help. I spend all day to find solution.
Solution:
Just move {...provided.dragHandleProps} from Draffable div to child, what you want use as a drag area.
Example:
<Draggable draggableId='draggable-1' index={0}>
{(provided)=>(
<div
ref={provided.innerRef}
{...provided.draggableProps}
>
<div {...provided.dragHandleProps}>DRAG AREA HERE</div>
<li>item</li>
</div>
)
}
</Draggable>
@mflash123 Thank you for the solution it worked!
@mflash123 It works like a charm. Thanks!
I think it's called placeholder
Closing this thanks to @mflash123
Most helpful comment
Thats sad that community doesnt聽help. I spend all day to find solution.
Solution:
Just move
{...provided.dragHandleProps}from Draffable div to child, what you want use as a drag area.Example: