Skip to content

Commit

Permalink
fix: reactivity (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Razboy20 authored Mar 22, 2024
1 parent 8a5e12e commit 4f4f34e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/components/common/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function List<T>({ draggables, itemKey, children, onReordered, gap }: ListProps<
return;
}
setItems(wrap(draggables, itemKey));
}, [draggables, itemKey, items]);
}, [draggables]);

const onDragEnd: OnDragEndResponder = useCallback(
({ destination, source }) => {
Expand All @@ -99,7 +99,7 @@ function List<T>({ draggables, itemKey, children, onReordered, gap }: ListProps<
setItems(reordered);
onReordered(reordered.map(item => item.content));
},
[items, onReordered]
[items]
);

return (
Expand Down

0 comments on commit 4f4f34e

Please sign in to comment.