                                       :onClick (fn []
                                                  ((result :action) (config :thread-id))
                                                  (close-autocomplete!))}
-                          (result :html)))
+                          ((result :html))))
                       results))
                   (dom/div #js {:className "result"}
                     "No Results")))))))))

;       thread-id - id of the thread
;    output:
;       if a trigger pattern was matched, an array of maps, each containing:
;         :html - html to be displayed for the result
;         :action - fn to be triggered when result picked
;         (this array may be empty)
;       otherwise nil


                        (dispatch! :tag-thread {:thread-id thread-id
                                                :id (tag :id)}))
                      :html
                      (fn []
                        (dom/div #js {:className "tag-match"}
                          (dom/div #js {:className "color-block"
                                        :style #js {:backgroundColor (helpers/tag->color tag)}})
                          (dom/div #js {:className "tag-name"}
                            (tag :name))
                          (dom/div #js {:className "group-name"}
                            (:name (store/id->group (tag :group-id))))))}))))))])


; TODO: autocomplete mentions
