diff --git a/src/components/Table/GridTable.tsx b/src/components/Table/GridTable.tsx index ee0a47059..7edca7d69 100644 --- a/src/components/Table/GridTable.tsx +++ b/src/components/Table/GridTable.tsx @@ -302,10 +302,13 @@ export function GridTable = an // Get the flat list or rows from the header down... visibleRows.forEach((rs) => { // only pass through events if the row is draggable and the user has provided a callback - const dragEventHandler = (callback: OnRowDragEvent | undefined) => (evt: DragEventType) => { - if (rs.row.draggable && droppedCallback && callback) { - callback({ ...rs.row }, evt); - } + const dragEventHandler = (callback: OnRowDragEvent | undefined) => { + return rs.row.draggable && callback ? + (evt: DragEventType) => { + if (rs.row.draggable && droppedCallback && callback) { + callback({ ...rs.row }, evt); + } + } : undefined }; const onDragStart = (row: GridDataRow, evt: DragEventType) => {