Make autocomplete case insensitive

This commit is contained in:
Francis Dinh 2018-04-11 04:23:13 -04:00
parent 748e01d3e9
commit 3d8d941d89

View File

@ -53,7 +53,8 @@ const PostStatusForm = {
candidates () {
const firstchar = this.textAtCaret.charAt(0)
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) {
return false
}