From e28a7da05ebcb87fde0f7ec86a12689a22ea54ac Mon Sep 17 00:00:00 2001
From: Stefan Peters
Date: Tue, 27 Oct 2020 10:25:36 +0100
Subject: [PATCH] Improve handling of show only favorites filter (#588)
---
src/components/ConceptSchemeSelection.vue | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/components/ConceptSchemeSelection.vue b/src/components/ConceptSchemeSelection.vue
index 3843790aa..71ace09af 100644
--- a/src/components/ConceptSchemeSelection.vue
+++ b/src/components/ConceptSchemeSelection.vue
@@ -128,7 +128,7 @@
{{ $t("schemeSelection.filterOnlyFavorites") }}
@@ -463,6 +463,9 @@ export default {
}
return options
},
+ allowFavoriteSchemesFilter() {
+ return !!this.favoriteSchemes.find(s => this.$jskos.isContainedIn(s, this.schemes))
+ },
},
watch: {
popoverShown(show) {
@@ -482,8 +485,8 @@ export default {
typeFilter() {
this.schemeFilter = ""
},
- favoriteSchemes() {
- if (!this.favoriteSchemes.find(s => this.$jskos.isContainedIn(s, this.schemes))) {
+ allowFavoriteSchemesFilter(value) {
+ if (!value) {
this.onlyFavorites = false
}
},
@@ -495,6 +498,9 @@ export default {
this.registryFilter = this.availableRegistries.map(r => r.uri)
this.languageFilter = this.availableLanguages.concat([null])
this.typeFilter = this.availableTypes.concat([null])
+ if (!this.allowFavoriteSchemesFilter) {
+ this.onlyFavorites = false
+ }
},
methods: {
clickHandlers() {