Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

fix: display all item labels in the element card (#809)

zebrapurringc1c8eb649cb0
diff --git a/frontend/components/Item/Card.vue b/frontend/components/Item/Card.vue
index e4825e1f..ea7a88dd 100644
--- a/frontend/components/Item/Card.vue
+++ b/frontend/components/Item/Card.vue
@@ -47,7 +47,7 @@
</TooltipProvider>
<Markdown class="mb-2 line-clamp-3 text-ellipsis" :source="item.description" />
<div class="-mr-1 mt-auto flex flex-wrap justify-end gap-2">
- <LabelChip v-for="label in top3" :key="label.id" :label="label" size="sm" />
+ <LabelChip v-for="label in itemLabels" :key="label.id" :label="label" size="sm" />
</div>
</div>
</NuxtLink>
@@ -76,8 +76,8 @@
}
});
- const top3 = computed(() => {
- return props.item.labels.slice(0, 3) || [];
+ const itemLabels = computed(() => {
+ return props.item.labels || [];
});
const props = defineProps({