|
Title: Tree Post by: yongchang on July 22, 2020, 12:15:26 AM What I am trying to do: selected node draggable and droppable.
I have make a codesandbox (https://codesandbox.io/s/rc-easyui-tree-j12kk?file=/src/App.js) to show what I have done so far. This is the code that I have tried, it is not working. Any advice is appreciated. Code: handleSelectionChange(selection) {Title: Re: Tree Post by: jarry on July 22, 2020, 11:45:01 PM The dnd is the built-in feature in Tree component. Please look at this example https://www.jeasyui.com/demo-react/main/index.php?plugin=Tree&theme=material-teal&dir=ltr&pitem=Drag%20Drop%20Tree%20Nodes&sort=asc
Title: Re: Tree Post by: yongchang on July 23, 2020, 08:41:51 PM That is not what I am trying to do.
I want to drag the node and place it somewhere else like this Demo (https://www.jeasyui.com/demo-react/main/index.php?plugin=Droppable&theme=material-teal&dir=ltr&pitem=&sort=asc). Click on the word Demo to navigate to the demo I am referring. Title: Re: Tree Post by: jarry on July 27, 2020, 02:14:57 AM Custom the tree nodes to make them draggable and then define a Droppable area to accept the dropped nodes. Please refer to the code below.
Code: renderNode({ node }) {Code: <div className="f-row"> |