Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to drag node between two trees #18466

Closed
1 task
fake-car opened this issue Aug 26, 2019 · 1 comment
Closed
1 task

How to drag node between two trees #18466

fake-car opened this issue Aug 26, 2019 · 1 comment
Assignees

Comments

@fake-car
Copy link

fake-car commented Aug 26, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

我想在两颗树上互相拖拽子节点,但目前看回调是不完整的,请问目前能实现两棵树的节点之间互相拖拽吗

What does the proposed API look like?

<Tree
  className={styles.tree}
  onSelect={this.onNodeSelected}
  expandedKeys={newArr}
  onExpand={this.onExpand}
  autoExpandParent={true}
  draggable
  blockNode
  onDrop={this.onDrop}
>
  {modifiedData && this.mapTrees(modifiedData, selectedNode)}
</Tree>
<Tree
  className={styles.tree}
  onSelect={this.onNodeSelected}
  expandedKeys={newArr}
  onExpand={this.onExpand}
  autoExpandParent={true}
  draggable
  blockNode
  onDrop={this.onDrop}
>
  {modifiedData && this.mapTrees(modifiedData, selectedNode)}
</Tree>

回调的info是这样的

{
  dragNode: undefined
  dragNodesKeys: []
  dropPosition: NaN
  dropToGap: true
  event: Class {dispatchConfig: {}, _targetInst: FiberNode, _dispatchListeners: ƒ, _dispatchInstances: FiberNode, nativeEvent: DragEvent,}
  node: TreeNode {props: {}, context: {}, refs: {}, updater: {}, onSelectorClick: ƒ,}
}
@afc163
Copy link
Member

afc163 commented Aug 26, 2019

Sorry, this feature is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants