Skip to content

Commit

Permalink
Only search series name when inside a group (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan authored May 30, 2024
1 parent 208beae commit b43af4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/collection/Collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ const getFilter = (
query: string,
filterCondition?: FilterCondition,
sortingCriteria?: SortingCriteria,
isSeries = true,
isSeriesSearch = true,
): FilterType => {
let finalCondition: FilterCondition | undefined;
if (query) {
let searchCondition: FilterCondition = {
Type: 'AnyContains',
Type: isSeriesSearch ? 'StringContains' : 'AnyContains',
Left: {
Type: 'NamesSelector',
Type: isSeriesSearch ? 'NameSelector' : 'NamesSelector',
},
Parameter: query,
};
Expand Down Expand Up @@ -71,7 +71,7 @@ const getFilter = (
return (
finalCondition
? {
ApplyAtSeriesLevel: isSeries,
ApplyAtSeriesLevel: isSeriesSearch,
Expression: finalCondition,
Sorting: sortingCriteria ?? { Type: 'Name', IsInverted: false },
}
Expand Down

0 comments on commit b43af4a

Please sign in to comment.