Skip to content

Commit

Permalink
fix: improper list data propagation (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samathingamajig authored Oct 1, 2024
1 parent 0ab83ef commit 149fda3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/views/components/common/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ function List<T>({ draggables, itemKey, children, onReordered, gap }: ListProps<
const transformFunction = children;

useEffect(() => {
// check if the draggables content has *actually* changed
if (
draggables.length === items.length &&
draggables.every((element, index) => itemKey(element) === items[index]?.id)
) {
return;
}
setItems(wrap(draggables, itemKey));
}, [draggables]);

Expand Down

0 comments on commit 149fda3

Please sign in to comment.