I've recently been trying to build a trello-like application using react-beautiful dnd. I am able to get draggables to drag elements, but when I grab an element to drag, all the draggable elements drag with it. I've been going through react-beautiful-dnd's egghead.io course and documentation, but am still unable to figure out why all of the draggables are dragging.
Here is a sample of my code for my droppable:
<div>
<Droppable droppableId={toString(this.props.column.column_id)}>
{provided => (
<div
ref={provided.innerRef}
{...provided.droppableProps}
className='task-columns'
>
{this.props.column.column_name}
{this.state.tasks.map((taskData, i) => <Tasks key={taskData.task_id} task={taskData} index={i}/> )}
{provided.placeholder}
</div>
)}
</Droppable>
</div>
And here is the code for my draggable items:
<Draggable draggableId={toString(this.props.task.task_id)} index={this.props.index}>
{provided => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
{this.props.task.task}
</div>
)}
</Draggable>
These are both inside of the render method of class components. Thanks in advance for your help!