Skip to content

Commit

Permalink
fix(ESSNTL-4404): global filters and tags (#1788)
Browse files Browse the repository at this point in the history
Before, if you applied a global filter (workloads, sids, tags), the inventory table did not reflect the filter. Now global filters are applied to the table and work together with table filters.

Co-authored-by: Michael Johnson <[email protected]>
  • Loading branch information
johnsonm325 and Michael Johnson authored Mar 13, 2023
1 parent 0c3682e commit b10ce31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,16 @@ export async function getEntities(items, {
orderDirection,
filters.staleFilter,
[
...constructTags(filters.tagFilters),
...options.tags || []
...constructTags(filters?.tagFilters),
...options?.globalFilter?.tags || []
],
filters?.registeredWithFilter,
undefined,
undefined,
{
cancelToken: controller && controller.token,
query: {
...(options?.globalFilter?.filter && generateFilter(options.globalFilter.filter)),
...(options.filter && Object.keys(options.filter).length && generateFilter(options.filter)),
...(calculateSystemProfile(filters)),
...(fields && Object.keys(fields).length && generateFilter(fields, 'fields')),
Expand Down

0 comments on commit b10ce31

Please sign in to comment.