diff --git a/frontend/components/Form/Autocomplete.vue b/frontend/components/Form/Autocomplete.vue
index b2e2d44..9d7c8bb 100644
--- a/frontend/components/Form/Autocomplete.vue
+++ b/frontend/components/Form/Autocomplete.vue
@@ -28,7 +28,7 @@
- {{ usingObjects ? obj[itemText] : obj }}
+ {{ extractor(obj, itemText) }}
@@ -94,6 +94,14 @@
}
);
+ function extractor(obj: string | ItemsObject, key: string | number): string {
+ if (typeof obj === "string") {
+ return obj;
+ }
+
+ return obj[key] as string;
+ }
+
const value = useVModel(props, "modelValue", emit);
const usingObjects = computed(() => {
@@ -135,6 +143,7 @@
value.value = "";
return;
}
+ // @ts-ignore
value.value = obj;
} else {
if (obj === value.value) {
@@ -142,6 +151,7 @@
return;
}
+ // @ts-ignore
value.value = obj;
}
}
diff --git a/frontend/components/Item/CreateModal.vue b/frontend/components/Item/CreateModal.vue
index 5dfdc2a..1b9bec5 100644
--- a/frontend/components/Item/CreateModal.vue
+++ b/frontend/components/Item/CreateModal.vue
@@ -36,7 +36,7 @@