diff --git a/assets/app_component_dataset.js b/assets/app_component_dataset.js index 572fb49f..c3073e6e 100644 --- a/assets/app_component_dataset.js +++ b/assets/app_component_dataset.js @@ -218,10 +218,17 @@ const datasetView = () => c.dirs_from_path[c.dirs_from_path.length - 1] .toLowerCase() .indexOf(this.search_text.toLowerCase()) >= 0 || - // || (c.authors.some(e => e.givenName.toLowerCase().indexOf(this.search_text.toLowerCase()) >= 0)) c.authors.some( (f) => - f.name.toLowerCase().indexOf(this.search_text.toLowerCase()) >= 0 + f.givenName && f.givenName.toLowerCase().indexOf(this.search_text.toLowerCase()) >= 0 + ) || + c.authors.some( + (f) => + f.familyName && f.familyName.toLowerCase().indexOf(this.search_text.toLowerCase()) >= 0 + ) || + c.authors.some( + (f) => + f.name && f.name.toLowerCase().indexOf(this.search_text.toLowerCase()) >= 0 ) ); }); @@ -326,6 +333,9 @@ const datasetView = () => dataset_version: objVersion, }, } + // before navigation, clear filtering options + this.clearFilters() + // now navigate if (newBrowserTab) { const routeData = router.resolve(route_info); window.open(routeData.href, '_blank'); @@ -338,6 +348,11 @@ const datasetView = () => this.$root.$emit("bv::show::modal", "modal-3", "#btnShow"); } }, + clearFilters() { + this.search_text = "" + this.search_tags = [] + this.clearSearchTagText() + }, selectDescription(desc) { if (desc.content.startsWith("path:")) { this.description_ready = false; diff --git a/assets/app_component_item.js b/assets/app_component_item.js index bfe0a4c8..dea66b53 100644 --- a/assets/app_component_item.js +++ b/assets/app_component_item.js @@ -89,6 +89,9 @@ Vue.component('tree-item', function (resolve, reject) { dataset_version: objVersion, }, } + // before navigation, clear filter options + this.$emit('clear-filters') + // now navigate if (newBrowserTab) { const routeData = router.resolve(route_info); window.open(routeData.href, '_blank'); diff --git a/templates/dataset-template.html b/templates/dataset-template.html index c80db10a..48d43f23 100644 --- a/templates/dataset-template.html +++ b/templates/dataset-template.html @@ -170,7 +170,7 @@

Cite dataset

There are no subdatasets listed for the current dataset - + @@ -246,7 +246,12 @@
{{ds.dirs_from_path.at - {{keyword}}  + + {{keyword}}  + + + {{keyword}}  + @@ -265,7 +270,7 @@
{{ds.dirs_from_path.at
    - +
diff --git a/templates/item-template.html b/templates/item-template.html index 20bea14e..24de4015 100644 --- a/templates/item-template.html +++ b/templates/item-template.html @@ -17,6 +17,6 @@
    - +
\ No newline at end of file