react-beautiful-dnd 警告及解決方式匯總

react-beautiful-dnd 警告及解決方式匯總

react-beautiful-dnd Unable to find draggable with id: 1

image
{list.map((item, index) => (
  <DraggableItem route={item} index={index} />
))}
<Draggable
  draggableId={data.id.toString()}
  index={index}
>
    ...
</Draggable>

解決方法:

刪除 <React.StrictMode></React.StrictMode>

placeholder could not be found

Droppable setup issue [droppableId: "test"]:DroppableProvided > placeholder could not be found.Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.

解決方式:

<Droppable></Droppable> 內加上 {provided.placeholder}

guest

0 評論
最舊
最新 最多投票
內聯回饋
查看全部評論