                   ^{:key name}
                   [:li {:class (if (= tb @selected) "selected" "") :tabIndex 101
                         :on-click #(reset! selected tb)
-                        :on-double-click #((:preview-table ops) name)}
+                        :on-double-click #(.preview ops name)}
                    [:i.fa {:class (icons type)}] name]))]]])))
 
 (defn code-mirror [instance config]

           [c/tab {:eventKey id
                   :title (r/as-element
                           [:span id
                            [c/close-button #((:delete-tab ops) t)]])}
            [query-table db t]])]]])))


(defn sql-panel [db ops active?]
  (let [cm (atom nil)
        exec-sql (fn[] (.exec-sql ops
                        (if (empty? (.getSelection @cm))
                          (.getValue @cm) (.getSelection @cm))))]
    (fn[db ops]
