Skip to content

Commit

Permalink
fixed search bar in collections list
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Sep 6, 2024
1 parent d9dd531 commit 681ae9f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ export const ConversationList = ({

const filterVariables = () => {
if (groups && selectedCollectionId) {
return GROUP_COLLECTION_SEARCH_QUERY_VARIABLES;
return {
...GROUP_COLLECTION_SEARCH_QUERY_VARIABLES,
filter: {
groupLabel: searchVal,
searchGroup: true,
},
};
} else if (groups) {
if (phonenumber?.length === 0 || !phonenumber) {
return GROUP_QUERY_VARIABLES;
Expand Down Expand Up @@ -256,7 +262,7 @@ export const ConversationList = ({
getFilterSearch({
variables: filterSearch(),
});
} else if (hasSearchParams || savedSearchCriteria || phonenumber) {
} else if (hasSearchParams || savedSearchCriteria || phonenumber || selectedCollectionId) {
// This is used for filtering the searches, when you click on it, so only call it
// when user clicks and savedSearchCriteriaId is set.
addLogs(`filtering the searches`, filterVariables());
Expand Down

0 comments on commit 681ae9f

Please sign in to comment.