Skip to content

Commit

Permalink
fix #12269. Fix Tree onDrop ts type
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Sep 17, 2018
1 parent c935d53 commit e58273d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/tree/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ export interface AntTreeNodeMouseEvent {
event: React.MouseEventHandler<any>;
}

export interface AntTreeNodeDropEvent {
node: AntTreeNode;
dragNode: AntTreeNode;
dragNodesKeys: string[];
event: React.MouseEventHandler<any>;
}

export interface TreeProps {
showLine?: boolean;
className?: string;
Expand Down Expand Up @@ -130,7 +137,7 @@ export interface TreeProps {
/** dragleave 触发时调用 */
onDragLeave?: (options: AntTreeNodeMouseEvent) => void;
/** drop 触发时调用 */
onDrop?: (options: AntTreeNodeMouseEvent) => void;
onDrop?: (options: AntTreeNodeDropEvent) => void;
style?: React.CSSProperties;
showIcon?: boolean;
icon?: (nodeProps: AntdTreeNodeAttribute) => React.ReactNode | React.ReactNode;
Expand Down

0 comments on commit e58273d

Please sign in to comment.