feat: refactor frontend tag interaction handlers
This commit is contained in:
@@ -38,9 +38,10 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
} = useDocumentsFilter();
|
||||
|
||||
// Handlers
|
||||
const tagDragHandlers = useTagInteractions({
|
||||
const tagHandlers = useTagInteractions({
|
||||
onAssignTagToDocument: props.onDocumentTagAttach,
|
||||
onRemoveTagFromDocument: props.onDocumentTagDetach,
|
||||
onTagClick: toggleTagFilter,
|
||||
});
|
||||
|
||||
// Derived State
|
||||
@@ -147,7 +148,7 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
handleFolderClick,
|
||||
handleDocumentDragStartLocal,
|
||||
handleDocumentDragEndLocal,
|
||||
tagDragHandlers,
|
||||
tagHandlers,
|
||||
toggleTagFilter,
|
||||
toggleCorrespondentFilter,
|
||||
});
|
||||
@@ -158,7 +159,7 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
handleFolderClick,
|
||||
handleDocumentDragStartLocal,
|
||||
handleDocumentDragEndLocal,
|
||||
tagDragHandlers,
|
||||
tagHandlers,
|
||||
toggleTagFilter,
|
||||
toggleCorrespondentFilter,
|
||||
};
|
||||
@@ -198,7 +199,7 @@ export const useDocumentsContextValues = (props: DocumentsPanelInnerProps) => {
|
||||
assetContextValue,
|
||||
viewStateContextValue,
|
||||
commandContextValue,
|
||||
tagDragHandlers,
|
||||
tagHandlers,
|
||||
scrollRef,
|
||||
hasDocumentEntries,
|
||||
isSearchLoading,
|
||||
|
||||
Reference in New Issue
Block a user