feat(labels): sort labels alphabetically

This commit is contained in:
kolaente 2025-03-09 11:47:41 +01:00
parent a28bbfc8df
commit 80f384a131
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ const props = defineProps<{
labels: ILabel[],
}>()
const displayLabels = computed(() => Array.from(new Map(props.labels.map(label => [label.id, label])).values()))
const displayLabels = computed(() =>
Array.from(new Map(props.labels.map(label => [label.id, label])).values())
.sort((a, b) => a.title.localeCompare(b.title)),
)
</script>
<style lang="scss" scoped>