             [sablono.core :as html :refer-macros [html]]
             [cljs-http.client :as http]
             [cljs.core.async :refer [<! >! chan]]
-            [searchbot.meta :refer [widget-wrapper detail]]))
+            [searchbot.meta :refer [widget-wrapper detail]]
+            [clojure.string :as string]))
 
 ;;;;;;;;;;;;;
 ;; searchbox

                            [:thead
                             [:tr
                              (for [col (:header opts)]
                                [:th (:label col) (str " (" (:field col) ")")])]]
                            [:tbody
                             (let [hits (get-in query-result [:hits :hits])]
                               (for [hit hits]
                                 [:tr
                                  (for [col (:header opts)]
                                    [:td (-> hit :_source (get (-> col :field keyword)))])]))]]]]
                         [:.card-reveal
                          [:span.card-title.grey-text.text-darken-4 "metadata"
                           [:i.mdi-navigation-close.right]

                  (html [:.card
                         [:.card-content
                          [:span.card-title.black-text "searching in "
                           [:strong (join-str (:es-index opts) (:es-type opts))]
                           [:a.btn-floating.btn-flat.waves-effect.activator.white.right
                            [:i.mdi-action-settings.grey-text]]]
                          [:.input-field
