dnd-timeline
dnd-timeline copied to clipboard
how to disable drag, resize
I had like to disable dragging in specific page, so found useDraggable hook in refered links but It seems not working.
I'd like to disable resizing as well, but I can't find
I refered: https://samuel-arbibe.gitbook.io/dnd-timeline/documentation/item https://docs.dndkit.com/api-documentation/draggable
I have tried:
import { useDraggable } from "@dnd-kit/core";
const { attributes, listeners, setNodeRef, transform } = useDraggable({
disabled: true,
});
return(
/* other codes */
<Item ref={setNodeRef} id={item.id} key={item.id} relevance={item.relevance} >
<div>{`${item.id}`}</div>
</Item>
/* other codes */
)