Skip to content

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

fix: Table sorting for ID and date columns (#802)

Michael Manganiello8493ec0c90cd
diff --git a/frontend/components/Item/View/Table.vue b/frontend/components/Item/View/Table.vue
index a4e99793..c2741476 100644
--- a/frontend/components/Item/View/Table.vue
+++ b/frontend/components/Item/View/Table.vue
@@ -256,8 +256,8 @@
function extractSortable(item: ItemSummary, property: keyof ItemSummary): string | number | boolean {
const value = item[property];
if (typeof value === "string") {
- // Try parse float
- const parsed = parseFloat(value);
+ // Try to parse number
+ const parsed = Number(value);
if (!isNaN(parsed)) {
return parsed;
}