This commit is contained in:
Liyas Thomas
2020-06-19 12:26:04 +05:30
parent fcbc738088
commit 1587a44cd7
33 changed files with 63 additions and 77 deletions

View File

@@ -194,14 +194,14 @@ export default {
return (
this.source
.filter(entry => {
.filter((entry) => {
return (
entry.toLowerCase().startsWith(input.toLowerCase()) &&
input.toLowerCase() !== entry.toLowerCase()
)
})
// Cut off the part that's already been typed.
.map(entry => entry.substring(this.selectionStart))
.map((entry) => entry.substring(this.selectionStart))
// We only want the top 6 suggestions.
.slice(0, 6)
)