Skip to content

Commit 9ae13f5

Browse files
committed
try grabbing again
1 parent 4263a91 commit 9ae13f5

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

compose/neurosynth-frontend/src/pages/Study/components/EditStudyAnnotationsHotTable.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { getType, IMetadataRowModel } from 'components/EditMetadata/EditMetadata
66
import { sanitizePaste } from 'components/HotTables/HotTables.utils';
77
import CellCoords from 'handsontable/3rdparty/walkontable/src/cell/coords';
88
import { CellChange } from 'handsontable/common';
9+
import { registerAllModules } from 'handsontable/registry';
910
import { useUserCanEdit } from 'hooks';
1011
import { useProjectUser } from 'pages/Project/store/ProjectStore';
1112
import { HotSettings } from 'pages/Study/components/EditStudyAnnotationsHotTable.helpers';
@@ -19,6 +20,8 @@ import {
1920
useUpdateAnnotationNotes,
2021
} from 'stores/AnnotationStore.actions';
2122

23+
registerAllModules();
24+
2225
const EditStudyAnnotationsHotTable: React.FC<{ readonly?: boolean }> = ({ readonly = false }) => {
2326
const hotTableRef = useRef<HotTable>(null);
2427
const noteKeys = useAnnotationNoteKeys();
@@ -122,17 +125,6 @@ const EditStudyAnnotationsHotTable: React.FC<{ readonly?: boolean }> = ({ readon
122125
hotTableRef.current?.hotInstance?.getPlugin('manualColumnMove').clearMoves();
123126
};
124127

125-
const handleBeforeOnCellMouseDown = (event: MouseEvent, coords: CellCoords) => {
126-
if (coords.row < 0) {
127-
const target = event.target as HTMLElement;
128-
const isDragHandle = target?.closest('[data-drag-handle="true"]');
129-
if (isDragHandle) {
130-
// allow drag to proceed; prevent default selection highlighting
131-
event.preventDefault();
132-
}
133-
}
134-
};
135-
136128
const memoizedData = useMemo(() => {
137129
return JSON.parse(JSON.stringify(data || []));
138130
}, [data]);
@@ -183,7 +175,6 @@ const EditStudyAnnotationsHotTable: React.FC<{ readonly?: boolean }> = ({ readon
183175
indicators: false,
184176
}}
185177
afterOnCellMouseUp={handleCellMouseUp}
186-
beforeOnCellMouseDown={handleBeforeOnCellMouseDown}
187178
manualColumnMove={!readonly && canEdit}
188179
afterColumnMove={handleColumnMove}
189180
colWidths={colWidths}

0 commit comments

Comments
 (0)