diff --git a/src/components/Table/GridTable.tsx b/src/components/Table/GridTable.tsx index 7edca7d69..6c2c7068a 100644 --- a/src/components/Table/GridTable.tsx +++ b/src/components/Table/GridTable.tsx @@ -303,12 +303,13 @@ export function GridTable = an visibleRows.forEach((rs) => { // only pass through events if the row is draggable and the user has provided a callback const dragEventHandler = (callback: OnRowDragEvent | undefined) => { - return rs.row.draggable && callback ? - (evt: DragEventType) => { - if (rs.row.draggable && droppedCallback && callback) { - callback({ ...rs.row }, evt); - } - } : 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) => {