Skip to content

Commit

Permalink
feat[#78]: when clicking a tag name under a guide, it doesn't trigger…
Browse files Browse the repository at this point in the history
… filter to display all guides under the tag
  • Loading branch information
muhdsalm authored and mirkobrombin committed Jul 12, 2024
1 parent a407de7 commit b10d02e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/CollectionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</h4>
<p class="text-gray-700 dark:text-gray-300 mb-4">{{ article.Description }}</p>
<div class="flex flex-wrap gap-2 mt-2 mb-4">
<span v-for="tag in article.Tags" :key="tag"
class="inline-block bg-blue-100 dark:bg-gray-800 text-blue-800 dark:text-blue-200 rounded-full px-3 py-1 text-xs font-medium">
<span v-for="tag in article.Tags" :key="tag" @click="setTag(tag)"
class="inline-block bg-blue-100 dark:bg-gray-800 text-blue-800 dark:text-blue-200 rounded-full px-3 py-1 text-xs font-medium cursor-pointer">
{{ tag }}
</span>
</div>
Expand Down Expand Up @@ -178,6 +178,9 @@ export default defineComponent({
document.head.appendChild(meta);
}
},
setTag(tag: string) {
this.selectedTags = [tag as never]
}
},
});
</script>

0 comments on commit b10d02e

Please sign in to comment.