feat: refactor frontend tag interaction handlers
This commit is contained in:
@@ -14,17 +14,17 @@ import EntryTags from './EntryTags';
|
||||
import FolderEntry from './FolderEntry';
|
||||
import DocumentEntry from './DocumentEntry';
|
||||
|
||||
import { TagDragHandlers } from '../interactions/useTagInteractions';
|
||||
import { TagInteractionHandlers } from '../interactions/useTagInteractions';
|
||||
|
||||
interface DocumentsListRowProps {
|
||||
entry: DocumentsListEntry;
|
||||
viewLogic: DocumentViewLogic;
|
||||
iconSize?: number;
|
||||
tagDragHandlers?: TagDragHandlers;
|
||||
tagHandlers?: TagInteractionHandlers;
|
||||
}
|
||||
|
||||
const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
|
||||
const { entry, iconSize, tagDragHandlers } = props;
|
||||
const { entry, iconSize, tagHandlers } = props;
|
||||
const { ensureAssetUrl, getDocumentAsset } = useDocumentsAssetContext();
|
||||
const { scrollRef, activeCorrespondentIdSet, tagLookupById } = useDocumentsViewStateContext();
|
||||
const {
|
||||
@@ -91,7 +91,7 @@ const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
|
||||
return (
|
||||
<DocumentEntry
|
||||
doc={doc}
|
||||
tagDragHandlers={tagDragHandlers}
|
||||
tagHandlers={tagHandlers}
|
||||
viewLogic={props.viewLogic}
|
||||
component="tr"
|
||||
className="document"
|
||||
@@ -142,7 +142,7 @@ const DocumentsListRow: React.FC<DocumentsListRowProps> = (props) => {
|
||||
tagLookupById={tagLookupById}
|
||||
onTagClick={onTagClick}
|
||||
doc={doc}
|
||||
tagDragHandlers={logic.handlers.tagDragHandlers}
|
||||
tagHandlers={logic.handlers.tagHandlers}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user