feat: Implement tag drag-and-drop functionality
This commit is contained in:
@@ -184,13 +184,6 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
},
|
||||
},
|
||||
tags: {
|
||||
onDrag: {
|
||||
start: (e: any, d: any, t: any) => latestHandlersRef.current.tagDragHandlers.onTagDragStart(e, d, t),
|
||||
end: (e: any) => latestHandlersRef.current.tagDragHandlers.onTagDragEnd(e),
|
||||
over: (e: any, d: any) => latestHandlersRef.current.tagDragHandlers.onTagDragOver(e, d),
|
||||
leave: (e: any, d: any) => latestHandlersRef.current.tagDragHandlers.onTagDragLeave(e, d.id),
|
||||
drop: (e: any, d: any) => latestHandlersRef.current.tagDragHandlers.onTagDrop(e, d),
|
||||
},
|
||||
onAttach: (d: any, t: any) => latestPropsRef.current.onDocumentTagAttach?.(d, t),
|
||||
onDetach: (d: any, t: any) => latestPropsRef.current.onDocumentTagDetach?.(d, t),
|
||||
onClick: (t: any) => latestHandlersRef.current.toggleTagFilter(t),
|
||||
@@ -199,12 +192,13 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
onClick: (c: any) => latestHandlersRef.current.toggleCorrespondentFilter(c),
|
||||
},
|
||||
onEntryPointer: (entry: any, e: any) => latestPropsRef.current.onEntryPointer?.(entry, e),
|
||||
}), []); // Stable forever!
|
||||
}), []);
|
||||
|
||||
return {
|
||||
assetContextValue,
|
||||
viewStateContextValue,
|
||||
commandContextValue,
|
||||
tagDragHandlers,
|
||||
scrollRef,
|
||||
hasDocumentEntries,
|
||||
isSearchLoading,
|
||||
|
||||
Reference in New Issue
Block a user