@@ -6,6 +6,7 @@ import { getType, IMetadataRowModel } from 'components/EditMetadata/EditMetadata
66import { sanitizePaste } from 'components/HotTables/HotTables.utils' ;
77import CellCoords from 'handsontable/3rdparty/walkontable/src/cell/coords' ;
88import { CellChange } from 'handsontable/common' ;
9+ import { registerAllModules } from 'handsontable/registry' ;
910import { useUserCanEdit } from 'hooks' ;
1011import { useProjectUser } from 'pages/Project/store/ProjectStore' ;
1112import { HotSettings } from 'pages/Study/components/EditStudyAnnotationsHotTable.helpers' ;
@@ -19,6 +20,8 @@ import {
1920 useUpdateAnnotationNotes ,
2021} from 'stores/AnnotationStore.actions' ;
2122
23+ registerAllModules ( ) ;
24+
2225const 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