minop1205 / react-dnd-treeview

A draggable / droppable React-based treeview component. You can use render props to create each node freely.
MIT License
516 stars 69 forks source link

Disable canDrag on some of the selected node #189

Open nilesh2b opened 1 year ago

nilesh2b commented 1 year ago

Hi @minop1205

I need your help preventing some of the nodes to be dragged.

Right now it works perfect but it prevents dragging all nodes, can we prevent dragging some of the selected nodes?

minop1205 commented 1 year ago

@nilesh2b To control dragging, you can use the canDrag API.

minop1205 commented 1 year ago

If you cannot get the expected behavior using the canDrag API, please show me a repository or Codesandbox that can reproduce the problem.