                      (dom/span #js {:onClick commit} " commit? ")
                      (dom/span nil "}")))))))
 
-(defn track-view [{:keys [cursor id index]} owner]
+(defn track-view [{:keys [cursor id delete-ch]} owner]
   (reify
     om/IInitState
     (init-state [_]

                                        :style #js {:color "#999"}}
                                   (str "[-] " id " (" (get cursor "bpc") ")"))
                            (apply dom/table nil
                                   (let [cursors (map #(hash-map :cursor %1 :id %2 :index %3)
                                                      (get cursor "tracks")
                                                      (repeat id)
                                                      (range))]
                                     (om/build-all track-view cursors {:state state})))
                            (om/build track-builder {:cursor (get cursor "tracks")
                                                     :id id

  (reify
    om/IInitState
    (init-state [_]
      (let [delete-ch (chan)]
        {:grid-expanded false
         :delete-ch delete-ch}))
    om/IWillMount
    (will-mount [this]
      (let [delete-ch (:delete-ch (om/get-state owner))
            set-state-ch (:set-state-ch (om/get-state owner))]
        (go-loop []
          (let [track (<! delete-ch)
                cursor (get-in (om/observe owner (grids)) [id "tracks"])]
            (om/update! cursor (vec (remove (partial = track) cursor)))
            (put! set-state-ch id)
            (recur)))))
    om/IRenderState
    (render-state [_ state]
      (let [cursor (get (om/observe owner (grids)) id)]
