fix(front): create custom option in pills when user has pressed ENTER without matching suggestion

2448-complete-tags
Flupsi 2025-07-25 19:17:33 +02:00
rodzic 94b5c8a014
commit 6a31a708de
1 zmienionych plików z 2 dodań i 8 usunięć

Wyświetl plik

@ -140,15 +140,9 @@ const confirmed = (option:"BestMatch" | "New") => {
? match.value && other.value(match.value).item.isCurrent
? match.value
: { label: currentItem.value.label.replace(',', '').replace(' ', '').trim(), type: "custom" }
: option === "BestMatch"
: match.value && option === "BestMatch"
? match.value
: undefined
// // Apply the identical, otherwise the best match, if available
// currentItem.value
// = otherItems.value?.find(({ label })=>label === currentItem.value?.label.trim())
// || match.value
// || currentItem.value
: currentItem.value
// Close dropdown
isEditing.value = false