You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/v1/api.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ The main function of this library. React hook. The arguments are as follows:
54
54
| onChange<aid="onchange"/>|`(newData)=>void`|Callback on data change|
55
55
| canDrag<aid="candrag"/> |`(stat)=>boolean, null, undefined, void`| Whether a node draggable. Returning `null, undefined, void` means inheriting the parent node. |
56
56
| canDrop<aid="candrop"/> |`(stat, index)=>boolean, null, undefined, void`| Whether a node droppable. Returning `null, undefined, void` means inheriting the parent node. The parameter `index` may be empty. If it is not empty, it indicates the position. |
57
+
| canDropToRoot<aid="candroptoroot"/> |`(index)=>boolean`| whether the tree root can be dropped. The parameter `index` indicates the position. |
57
58
| customDragImage<aid="customdragimage"/> |`(event, stat)=> void`| Called `event.dataTransfer.setDragImage` to custom drag image. [Reference](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage). |
|onExternalDragOver<aid="onexternaldragover"/>|`(event)=>boolean`|Called when drag from external. Must return a Boolean value to indicate whether to handle this drag.|
0 commit comments