Skip to content

Commit

Permalink
use event.buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahajan committed Jul 8, 2020
1 parent 5a5b9fe commit a4ecddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataGrid.tsx
Expand Up @@ -465,7 +465,7 @@ function DataGrid<R, K extends keyof R, SR>({
}

function handleMouseDown(event: React.MouseEvent<HTMLDivElement, MouseEvent>) {
if (event.button !== 0) return;
if (event.buttons !== 1) return;
setDragging(true);
window.addEventListener('mouseover', onMouseOver);
window.addEventListener('mouseup', onMouseUp);
Expand Down

0 comments on commit a4ecddf

Please sign in to comment.