Skip to content

Commit

Permalink
fix(courses): make search case-insensitive (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCostaMedich authored Oct 31, 2024
1 parent 3ac5546 commit 61057f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/features/courses/screens/CourseDirectoryScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ const CourseFileSearchFlatList = ({ courseId, searchFilter }: SearchProps) => {
useEffect(() => {
if (!recentFilesQuery.data) return;
setSearchResults(
recentFilesQuery.data.filter(file => file.name.includes(searchFilter)),
recentFilesQuery.data.filter(file =>
file.name.toLowerCase().includes(searchFilter.toLowerCase()),
),
);
}, [recentFilesQuery.data, searchFilter]);

Expand Down

0 comments on commit 61057f9

Please sign in to comment.