Skip to content

Commit

Permalink
HeaderCell: Add missing event parameter to onPointerUp, fix #2305 (#2371
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nstepien authored Apr 22, 2021
1 parent 0f642f6 commit d6c23fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function HeaderCell<R, SR>({
function onPointerMove(event: PointerEvent) {
if (event.pointerId !== pointerId) return;
if (event.pointerType === 'mouse' && event.buttons !== 1) {
onPointerUp();
onPointerUp(event);
return;
}
const width = event.clientX + offset - currentTarget.getBoundingClientRect().left;
Expand All @@ -79,7 +79,7 @@ export default function HeaderCell<R, SR>({
}
}

function onPointerUp() {
function onPointerUp(event: PointerEvent) {
if (event.pointerId !== pointerId) return;
window.removeEventListener('pointermove', onPointerMove);
window.removeEventListener('pointerup', onPointerUp);
Expand Down

0 comments on commit d6c23fc

Please sign in to comment.