fix tag dragging
This commit is contained in:
@@ -127,7 +127,7 @@ interface UseDocumentMutationsResult {
|
||||
documentId: DocumentId,
|
||||
nextIssuedDate: number | null,
|
||||
) => Promise<boolean>;
|
||||
handleTagRemove: (
|
||||
handleDocumentTagDetach: (
|
||||
documentId?: DocumentId,
|
||||
tagId?: DocumentId,
|
||||
) => Promise<boolean>;
|
||||
@@ -588,7 +588,7 @@ const useDocumentMutations = ({
|
||||
[updateDocumentCaches],
|
||||
);
|
||||
|
||||
const handleTagRemove = useCallback(
|
||||
const handleDocumentTagDetach = useCallback(
|
||||
async (
|
||||
documentId?: DocumentId,
|
||||
tagId?: DocumentId,
|
||||
@@ -695,7 +695,7 @@ const useDocumentMutations = ({
|
||||
handleDocumentTagAttach,
|
||||
handleDocumentTitleUpdate,
|
||||
handleDocumentIssuedUpdate,
|
||||
handleTagRemove,
|
||||
handleDocumentTagDetach,
|
||||
handleFolderDelete,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -694,7 +694,7 @@ const useDocumentsWorkspace = ({
|
||||
handleDocumentTagAttach,
|
||||
handleDocumentTitleUpdate,
|
||||
handleDocumentIssuedUpdate,
|
||||
handleTagRemove,
|
||||
handleDocumentTagDetach,
|
||||
} = useDocumentMutations({
|
||||
documentLookup,
|
||||
folderLabelMap,
|
||||
@@ -1003,7 +1003,7 @@ const useDocumentsWorkspace = ({
|
||||
window.removeEventListener('dragend', handleTagDragEnd, true);
|
||||
setTagRemovalCursor(false);
|
||||
};
|
||||
}, [handleTagRemove, setTagRemovalCursor]);
|
||||
}, [handleDocumentTagDetach, setTagRemovalCursor]);
|
||||
|
||||
|
||||
const {
|
||||
@@ -1026,7 +1026,7 @@ const useDocumentsWorkspace = ({
|
||||
handleDocumentTitleUpdate,
|
||||
handleDocumentIssuedUpdate,
|
||||
handleDocumentTagAdd,
|
||||
handleTagRemove,
|
||||
handleDocumentTagDetach,
|
||||
ensureAssetUrl,
|
||||
getAsset: getDocumentAsset,
|
||||
correspondents,
|
||||
@@ -1098,7 +1098,8 @@ const useDocumentsWorkspace = ({
|
||||
activeTagFilters,
|
||||
handleTagUpdate,
|
||||
handleTagDelete,
|
||||
handleDocumentTagDrop: handleDocumentTagAttach,
|
||||
handleDocumentTagAttach,
|
||||
handleDocumentTagDetach,
|
||||
handleBulkTagAddFromDetail,
|
||||
handleBulkTagRemoveFromDetail,
|
||||
openTagsModal,
|
||||
|
||||
@@ -27,7 +27,7 @@ interface UseDetailWorkspaceArgs {
|
||||
handleDocumentTitleUpdate?: (docId: Identifier, title: string) => Promise<boolean> | boolean;
|
||||
handleDocumentIssuedUpdate?: (docId: Identifier, issued: number | null) => Promise<boolean> | boolean;
|
||||
handleDocumentTagAdd?: (doc: Document, value: string, context?: { option?: unknown }) => void;
|
||||
handleTagRemove?: (...args: unknown[]) => void;
|
||||
handleDocumentTagDetach?: (...args: unknown[]) => void;
|
||||
ensureAssetUrl?: EnsureAssetUrl;
|
||||
getAsset?: GetAsset;
|
||||
correspondents?: unknown[];
|
||||
@@ -64,7 +64,7 @@ const useDetailWorkspace = ({
|
||||
handleDocumentTitleUpdate,
|
||||
handleDocumentIssuedUpdate,
|
||||
handleDocumentTagAdd,
|
||||
handleTagRemove,
|
||||
handleDocumentTagDetach,
|
||||
ensureAssetUrl,
|
||||
getAsset,
|
||||
correspondents,
|
||||
@@ -184,7 +184,7 @@ const useDetailWorkspace = ({
|
||||
tags,
|
||||
tagLookupById,
|
||||
onTagAdd: handleDocumentTagAdd,
|
||||
onTagRemove: handleTagRemove,
|
||||
onTagRemove: handleDocumentTagDetach,
|
||||
onOpenPreview: openDocumentPreview,
|
||||
activePreviewId,
|
||||
onUpdateTitle: handleDocumentTitleUpdate,
|
||||
@@ -212,7 +212,7 @@ const useDetailWorkspace = ({
|
||||
handleDocumentTagAdd,
|
||||
handleDocumentIssuedUpdate,
|
||||
handleDocumentTitleUpdate,
|
||||
handleTagRemove,
|
||||
handleDocumentTagDetach,
|
||||
folderNodes,
|
||||
ensureFolderData,
|
||||
openDocumentPreview,
|
||||
|
||||
Reference in New Issue
Block a user