Skip to content

Commit a2b5990

Browse files
committed
add comment
1 parent f95c3af commit a2b5990

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/components/Search/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ function Search({queryJSON, searchResults, onSearchListScroll, contentContainerS
233233
}
234234
});
235235

236+
/**
237+
* The total should be calculated for all accounting queries (statements, unapprovedCash and unapprovedCard)
238+
* We can't use `searchKey` directly because we want to also match similar queries e.g. the statements suggested search query with a custom feed should be matched too.
239+
*/
236240
const isStatementsLikeQuery = queryJSON.flatFilters.length === 2 && hasFeedFilter && hasPostedFilter;
237241
const isUnapprovedCashLikeQuery =
238242
queryJSON.flatFilters.length === 1 &&

0 commit comments

Comments
 (0)