Open yiman58 opened 2 years ago
I am also having the same issue, I tried adding a background color using inline styling. It works with tailwind CSS but I also wanted to apply dynamic styling with my background using RGBA:
<Draggable
draggableId={draggableId}
index={index}
isDragDisabled={!category.draggable}
>
{(providedCategory) => (
<div
ref={providedCategory.innerRef}
{...providedCategory.draggableProps}
{...providedCategory.dragHandleProps}
className={`flex w-[${categoryWidth}px] min-w-[${categoryWidth}px] flex-col gap-3 rounded-xl p-3 shadow-md`}
style={{
backgroundColor: category?.color
? hexToRGBA(category?.color, 0.1)
: '#f3f4f6',
}}
>
// Rest of code here
</div>
)}
</Draggable>
It can still be dropped but the visual way of dragging the container does not work.
If I remove the styles comment, drag will not work,and console has no error
"react": "^16.6.0", "react-beautiful-dnd": "10.1.1",