Skip to content

Commit

Permalink
Fix autoScrollInterval leak
Browse files Browse the repository at this point in the history
  • Loading branch information
enzheng128 committed Mar 1, 2023
1 parent 5c58f0f commit 135dcbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/hooks/utilities/useAutoScroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ export function useAutoScroller({
JSON.stringify(threshold),
]
);

useEffect(() => clearAutoScrollInterval, [clearAutoScrollInterval]);
}

interface ScrollIntent {
Expand Down
4 changes: 2 additions & 2 deletions packages/utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dnd-kit/utilities",
"version": "3.2.1",
"version": "3.2.2",
"description": "Internal utilities to bee shared between `@dnd-kit` packages",
"author": "Claudéric Demers",
"license": "MIT",
Expand Down Expand Up @@ -34,4 +34,4 @@
"publishConfig": {
"access": "public"
}
}
}

0 comments on commit 135dcbf

Please sign in to comment.