Merge branch 'fix/autocomplete-case-insensitive' into 'develop'

Make autocomplete case insensitive

Closes #73

See merge request pleroma/pleroma-fe!225
This commit is contained in:
Shpuld Shpludson 2018-04-11 08:34:24 +00:00
commit 82ee24ec31

View file

@ -53,7 +53,8 @@ const PostStatusForm = {
candidates () { candidates () {
const firstchar = this.textAtCaret.charAt(0) const firstchar = this.textAtCaret.charAt(0)
if (firstchar === '@') { if (firstchar === '@') {
const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).match(this.textAtCaret.slice(1))) const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase()
.match(this.textAtCaret.slice(1).toUpperCase()))
if (matchedUsers.length <= 0) { if (matchedUsers.length <= 0) {
return false return false
} }