Skip to content

Commit

Permalink
#424: Add onTouchStart as it's necessary for Drag & Drop
Browse files Browse the repository at this point in the history
  • Loading branch information
aridanemartin committed Apr 4, 2024
1 parent cc87c6b commit 97ad3e0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const DatabaseTable: React.FC<Props> = ({
return [rows, totalY + TABLE_CONST.ROW_PADDING]; // Adjust for the last padding
}, [tableInfo.fields]);

const { onMouseDown } = useDraggable(
const { onMouseDown, onTouchStart, ref } = useDraggable(
tableInfo.id,
tableInfo.x,
tableInfo.y,
Expand All @@ -79,7 +79,9 @@ export const DatabaseTable: React.FC<Props> = ({
<g
transform={`translate(${tableInfo.x}, ${tableInfo.y})`}
onMouseDown={onMouseDown}
onTouchStart={onTouchStart}
className={classes.tableContainer}
ref={ref as React.LegacyRef<SVGGElement> | undefined}
>
<DatabaseTableBorder
totalHeight={totalHeight}
Expand Down

0 comments on commit 97ad3e0

Please sign in to comment.