FIX: Update preview when autocomplete is clicked (#10430)

FIX: Update preview when autocomplete is clicked (#10430)

diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js
index a8d7849..a17838f 100644
--- a/app/assets/javascripts/discourse/app/components/composer-editor.js
+++ b/app/assets/javascripts/discourse/app/components/composer-editor.js
@@ -188,7 +188,9 @@ export default Component.extend({
         dataSource: term => this.userSearchTerm.call(this, term),
         key: "@",
         transformComplete: v => v.username || v.name,
-        afterComplete() {
+        afterComplete: value => {
+          this.composer.set("reply", value);
+
           // ensures textarea scroll position is correct
           schedule("afterRender", () => $input.blur().focus());
         },

GitHub sha: b9891e3d

This commit appears in #10430 which was approved by jjaffeux. It was merged by markvanlan.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/category-name-missing-when-not-continuing-the-sentence/160982/6