A continuation of HomeBox the inventory and organization system built for the Home User
Merge pull request #261
Jackxwb888973e2cb14
diff --git a/frontend/components/Form/Autocomplete2.vue b/frontend/components/Form/Autocomplete2.vueindex 0bda7dd6..92fef222 100644--- a/frontend/components/Form/Autocomplete2.vue+++ b/frontend/components/Form/Autocomplete2.vue@@ -156,11 +156,26 @@const matches = index.value.search("*" + search.value + "*");+ let resultIDs = []for (let i = 0; i < matches.length; i++) {const match = matches[i];const item = props.items[parseInt(match.ref)];const display = extractDisplay(item);list.push({ id: i, display, value: item });+ resultIDs.push(item.id);+ }++ /**+ * Supplementary search,+ * Resolve the issue of language not being supported+ */+ for (let i = 0; i < props.items.length; i++) {+ const item = props.items[i]+ if(resultIDs.find(item_ => item_ === item.id) != undefined){continue}+ if(item.treeString.indexOf(search.value) > -1){+ const display = extractDisplay(item);+ list.push({ id: i, display, value: item });+ }}return list;