From 29b6ccff019e7652a060defe1c2bd3377af1a98e Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Tue, 7 Aug 2018 13:34:22 +1000 Subject: [PATCH] react sortable tree missing prop --- types/react-sortable-tree/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/react-sortable-tree/index.d.ts b/types/react-sortable-tree/index.d.ts index 0415db0414..3d0a7aa196 100644 --- a/types/react-sortable-tree/index.d.ts +++ b/types/react-sortable-tree/index.d.ts @@ -70,6 +70,12 @@ export interface OnDragPreviousAndNextLocation extends PreviousAndNextLocation { nextParent: TreeItem | null; } +export interface ShouldCopyData { + node: TreeItem, + prevPath: NumberArrayOrStringArray, + prevTreeIndex: number +} + export interface OnMovePreviousAndNextLocation extends PreviousAndNextLocation { nextParentNode: TreeItem | null; } @@ -186,6 +192,7 @@ export interface ReactSortableTreeProps { dndType?: string; placeholderRenderer?: PlaceholderRenderer; theme?: ThemeProps; + shouldCopyOnOutsideDrop?: boolean | ((data: ShouldCopyData) => boolean); } declare const SortableTree: React.ComponentClass;