From 3d8d941d89c436a354865e18766da39ebefd66e5 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 11 Apr 2018 04:23:13 -0400 Subject: [PATCH 1/3] Make autocomplete case insensitive --- src/components/post_status_form/post_status_form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 999aa732..c8a6802a 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -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 } From 11a89ee06d1296429d32de3f5e925f358ca12a83 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 11 Apr 2018 04:28:27 -0400 Subject: [PATCH 2/3] Replace tab indentation with spaces --- src/components/post_status_form/post_status_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index c8a6802a..81fb86f4 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -54,7 +54,7 @@ const PostStatusForm = { const firstchar = this.textAtCaret.charAt(0) if (firstchar === '@') { const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase() - .match(this.textAtCaret.slice(1).toUpperCase())) + .match(this.textAtCaret.slice(1).toUpperCase())) if (matchedUsers.length <= 0) { return false } From 52d72599eee5e866d60b2c4d946f4d6aaa1ea376 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 11 Apr 2018 04:29:46 -0400 Subject: [PATCH 3/3] Forgot to fix other tabs --- src/components/post_status_form/post_status_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 81fb86f4..c63c308c 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -54,7 +54,7 @@ const PostStatusForm = { const firstchar = this.textAtCaret.charAt(0) if (firstchar === '@') { const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase() - .match(this.textAtCaret.slice(1).toUpperCase())) + .match(this.textAtCaret.slice(1).toUpperCase())) if (matchedUsers.length <= 0) { return false }