This commit is contained in:
romankko2 committed 2023-04-05 17:56:02 +02:00
1 parent ebc27a9ae2
commit 6a76e2e6e6
5 files changed
+24 -12

No files matched your search

@@ -72,16 +72,19 @@ export default {
const normalizedValue = this._normalize(option.value)
return normalizedValue.includes(normalizedSearch)
// return normalizedSearch == normalizedValue.slice(0, normalizedSearch.length)
})
if (!filteredOptions[0])
return null
// const s = filteredOptions[0].value.split(' ')
// filteredOptions[0].value = s[1] + ' ' + s[0]
const suggestion = {
...filteredOptions[0],
_suggestionHiddenPart: filteredOptions[0].value.slice(0, normalizedSearch.length),
_suggestionShownPart: filteredOptions[0].value.slice(normalizedSearch.length, filteredOptions[0].value.length)
}
return suggestion