diff --git a/context/app/static/js/components/searchPage/config.js b/context/app/static/js/components/searchPage/config.js index 8481e60d25..0a066a116e 100644 --- a/context/app/static/js/components/searchPage/config.js +++ b/context/app/static/js/components/searchPage/config.js @@ -84,7 +84,7 @@ const alphabeticSort = { const datasetConfig = { filters: { 'Dataset Metadata': [ - listFilter('mapped_data_types', 'Data Type', alphabeticSort), + hierarchicalFilter(['dataset_type', 'mapped_data_types'], 'Dataset Type', alphabeticSort), listFilter('origin_samples.mapped_organ', 'Organ'), listFilter('source_samples.sample_category', 'Sample Category'), hierarchicalFilter(['mapped_status', 'mapped_data_access_level'], 'Status'), diff --git a/context/app/static/js/components/searchPage/utils.js b/context/app/static/js/components/searchPage/utils.js index 44cadd5eab..d0f9f49229 100644 --- a/context/app/static/js/components/searchPage/utils.js +++ b/context/app/static/js/components/searchPage/utils.js @@ -9,13 +9,14 @@ export function field(id, name, translations) { return def; } -export function hierarchicalFilter(ids, name) { +export function hierarchicalFilter(ids, name, rest) { const def = { type: 'AccordionHierarchicalMenuFilter', props: { fields: ids.map((id) => `${id}.keyword`), title: name, id: ids.join('-'), + ...rest, }, }; return def;