Skip to content

Commit

Permalink
fix(website): don't show and apply hidden filters in Download Panel (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoran-chen authored Mar 3, 2024
1 parent ed8e4eb commit c236a41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion website/src/pages/[organism]/search/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const {
data,
page,
metadataFilter,
metadataFilterWithoutHiddenFilters,
mutationFilter,
lapisUrl,
referenceGenomesSequenceNames,
Expand Down Expand Up @@ -42,7 +43,7 @@ const {
(data) => (
<div class='flex-1'>
<DownloadDialog
metadataFilter={metadataFilter}
metadataFilter={metadataFilterWithoutHiddenFilters}
mutationFilter={mutationFilter}
referenceGenomesSequenceNames={referenceGenomesSequenceNames}
lapisUrl={lapisUrl}
Expand Down
21 changes: 10 additions & 11 deletions website/src/utils/processParametersAndFetchSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,16 @@ export async function processParametersAndFetchSearch(astro: AstroGlobal, groupF
];
}

const metadataFilter = addHiddenFilters(
getMetadataFilters(
getSearchParams,
organism,
groupForMySequences !== undefined
? {
exclude: [GROUP_FIELD],
}
: {},
),
hiddenSearchFeatures,
const metadataFilterWithoutHiddenFilters = getMetadataFilters(
getSearchParams,
organism,
groupForMySequences !== undefined
? {
exclude: [GROUP_FIELD],
}
: {},
);
const metadataFilter = addHiddenFilters(metadataFilterWithoutHiddenFilters, hiddenSearchFeatures);
const mutationFilter = getMutationFilter(astro.url.searchParams);

const pageParam = getSearchParams('page');
Expand All @@ -73,6 +71,7 @@ export async function processParametersAndFetchSearch(astro: AstroGlobal, groupF
data,
page,
metadataFilter,
metadataFilterWithoutHiddenFilters,
mutationFilter,
lapisUrl,
referenceGenomesSequenceNames,
Expand Down

0 comments on commit c236a41

Please sign in to comment.