feat: refactor frontend tag interaction handlers

This commit is contained in:
2025-12-09 00:03:55 +01:00
parent c38d88c209
commit 99fa12a1be
11 changed files with 63 additions and 80 deletions
@@ -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,