diff --git a/views/vocabulary.ejs b/views/vocabulary.ejs index d68cf9e..faf82b5 100644 --- a/views/vocabulary.ejs +++ b/views/vocabulary.ejs @@ -123,6 +123,10 @@ }, } function changeTab(id) { + // Deselect concept via Vue component (workaround) + if (id !== 2 && window.selectConcept) { + window.selectConcept(null) + } lists.links.forEach((element, key) => { if (key === id) { element.classList.add("active") diff --git a/vue/components/ConceptBrowser.vue b/vue/components/ConceptBrowser.vue index 23a546c..316220f 100644 --- a/vue/components/ConceptBrowser.vue +++ b/vue/components/ConceptBrowser.vue @@ -110,6 +110,11 @@ export default { }, }, async mounted() { + // Define global method to select concept, even from EJS template + window.selectConcept = (concept) => { + this.selected = concept + } + const { scheme } = this // Get URI for selected concept from URL