                                               :className (when (= id (:selected cursor)) "row-selected")
                                               ;; TODO use this to scroll the row into view.
                                               ;; Possible solution here: http://stackoverflow.com/questions/1805808/how-do-i-scroll-a-row-of-a-table-into-view-element-scrollintoview-using-jquery
-                                              :id (str table-id "-selected") 
+                                              :id (str table-id "-selected")
                                               }
                                          (into-array
                                           (for [[k {:keys [href]}] cols]

           (str " - ")))

(defn programmes-tab [data owner]
  (let [{:keys [programmes projects properties 
                devices sensors measurements]} (:tables data)]
    (reify
      om/IWillMount
      (will-mount [_]
        (let [m           (mult history-channel)
              tap-history #(tap m (chan))]
          
          ;; attach a go-loop that fires ajax requests on history changes to each table
          
          ;;TODO still some cruft to tidy here:  /3 and singular/plural bunk.
          (ajax (tap-history) programmes {:template      "/3/programmes/"
                                          :content-type  "application/edn"

                                         (dom/th nil label)))))
                   (dom/tbody nil
                              (into-array
                               (for [{:keys [id href] :as row} (-> cursor :data
                                                                   (cond-> path path))]
                                 (dom/tr #js {:onClick (fn [_ _ ]
                                                         (println "click:" id)
