                              (raise! owner [:side-panel-changed {:key key}])
                              (.preventDefault e))} label]]))))
 
-(defn ^:private tab-class [tab key]
+(defn ^:private tab-class [active? in?]
   (join " "
         ["tab-pane" "fade" "side"
-         (when (= tab key)
-           "active in")]))
+         (when active? "active")
+         (when in? "in")]))
 
-(defn stop-panel [{:keys [panel data]} owner]
+(defn stop-panel [{:keys [panel data active? in?]} owner]
   (reify
     om/IDisplayName (display-name [_] "Stop Panel")
     om/IRender

      (let [tab (:tab panel)
            query (:stops-query panel)]
        (html
         [:div {:className (tab-class tab :stops)}
          [:div.tab-content-wrapper
           [:form.form-horizontal
            {:on-submit #(do

(ns gtfve.components.side-panel
  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
  (:require [clojure.string :refer [join]]
            [cljs.core.async :as async :refer [put! chan <! close! >!]]
            [om.core :as om]
            [sablono.core :as html :refer-macros [html]]
            [gtfve.async :refer [raise!]]
            [gtfve.state :as state]
            [gtfve.utils :as utils])
  (:import [goog.events EventType]))

(defn side-panel-tab [{:keys [key label tab]} owner]
  (reify
