Skip to content

Commit

Permalink
Always sort tags alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Jun 19, 2024
1 parent 21a167d commit cc97ee7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/components/DisplayTags.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div class="badge-container">
<div v-for="tag in tags" :key="tag.id" class="badge me-1" @click="searchWord(tag.name)">
<div
v-for="tag in [...tags].sort((a, b) => a.name.localeCompare(b.name))"
:key="tag.id"
class="badge me-1"
@click="searchWord(tag.name)"
>
{{ tag.name }}
</div>
</div>
Expand Down

0 comments on commit cc97ee7

Please sign in to comment.