From 834388dbe0fcbb735451549c54063c82f9169cec Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Fri, 12 Feb 2021 19:38:13 +0530 Subject: [PATCH] UX: trim `@` char from start of the username string in search. (#12060) Currently, we're unable to search users by their username with the `@` symbol in "Posted by" filter on advanced search page. --- .../javascripts/select-kit/addon/components/user-chooser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/select-kit/addon/components/user-chooser.js b/app/assets/javascripts/select-kit/addon/components/user-chooser.js index a98fb559fd3..84813221a25 100644 --- a/app/assets/javascripts/select-kit/addon/components/user-chooser.js +++ b/app/assets/javascripts/select-kit/addon/components/user-chooser.js @@ -51,6 +51,7 @@ export default MultiSelectComponent.extend({ search(filter = "") { filter = filter || ""; + filter = filter.replace(/^@/, ""); const options = this.selectKit.options; // prevents doing ajax request for nothing