Skip to content

Commit

Permalink
Add unfilteredListItems back to the dependency array for useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
zahrafalak committed Sep 1, 2024
1 parent 8d403d9 commit 959c10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function List({ data: unfilteredListItems }: Props) {
return unfilteredListItems.filter((item) =>
item.name.toLowerCase().includes(searchTerm.toLowerCase()),
);
}, [searchTerm]);
}, [searchTerm, unfilteredListItems]);

return (
<>
Expand Down

0 comments on commit 959c10a

Please sign in to comment.