We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df1ccfa commit a0f3826Copy full SHA for a0f3826
packages/core/src/controlledEnvironment/useOnDragOverTreeHandler.ts
@@ -23,7 +23,7 @@ const getHoveringPosition = (
23
const hoveringPosition = (clientY - treeTop) / itemHeight;
24
25
const treeLinearItems = linearItems[treeId];
26
- const linearIndex = Math.floor(hoveringPosition);
+ const linearIndex = Math.max(0, Math.floor(hoveringPosition));
27
28
if (linearIndex > treeLinearItems.length - 1) {
29
return {
0 commit comments