Filter movies by TmdbId and ImdbId in Select movies Modal

This commit is contained in:
Bogdan 2023-08-26 20:41:54 +03:00
parent 0f699a01f7
commit 6de0feda65
1 changed files with 5 additions and 2 deletions

View File

@ -166,8 +166,11 @@ function SelectMovieModalContent(props: SelectMovieModalContentProps) {
a.sortTitle.localeCompare(b.sortTitle)
);
return sorted.filter((item) =>
item.title.toLowerCase().includes(filter.toLowerCase())
return sorted.filter(
(item) =>
item.title.toLowerCase().includes(filter.toLowerCase()) ||
item.tmdbId.toString().includes(filter) ||
item.imdbId?.includes(filter)
);
}, [allMovies, filter]);