dnd-timeline icon indicating copy to clipboard operation
dnd-timeline copied to clipboard

how to disable drag, resize

Open soymi1k opened this issue 9 months ago • 1 comments

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 */
)

soymi1k avatar Apr 30 '24 06:04 soymi1k