                            :data-billing-method (:billing-method %)
                            :value value}
                       (:text %))) options)))))))
-        ;[:form#post-new-entry-bar.navbar-form.navbar-form-post-new-entry-bar
-         ;{:ref (fn [form] (aset this "form" form))}
-         ;[:select
-          ;{:name "post-new-entry-bar"
-           ;:placeholder "Post new entry..."
-           ;:defaultValue select-value}
-          ;[:option
-           ;{:value ""}
-           ;""]
-          ;(map #(let [value (str (:project-id %) "," (:task-id %))]
-                  ;[:option
-                   ;{:key value
-                    ;:data-project-id (:project-id %)
-                    ;:data-task-id (:task-id %)
-                    ;:data-billing-method (:billing-method %)
-                    ;:value value}
-                   ;(:text %)]) options)]]))))
   ;(letfn [(get-selectize [this] (.. (js/$ (aget this "form"))
                                      ;(find "select")
                                      ;(get 0)

                           (str projectId "," taskId) "")]
        (dom/form
          #js {:id "post-new-entry-bar"
               :className "navbar-form navbar-form-post-new-entry-bar"}
          (dom/select
            #js {:name "post-new-entry-bar"
                 :placeholder "Post new entry..."

(defn entry-bar-form' [for-state owner]
  (log "data %o" for-state)
  (reify
    om/IDidMount
    (did-mount [_]
      (let [$form (js/$ (om/get-node owner "the-form"))
            $select (.find $form "select")]
        (.selectize
          $select #js
          {:highlight false
           :selectOnTab true
           :score (partial selectize-score-fn for-state)
           :render #js {:option (partial selectize-render-option
                                         (:options-by-id for-state))
                        :item (fn [i e] (selectize-render-option
                                          (:options-by-id for-state)
                                          i e "option-selected"))}})
        (let [selectize (aget $select 0 "selectize")]
          (.on selectize "dropdown_close"
               (fn []
                 (let [value (.getValue selectize)]
                   (.setTimeout ; updating the state will trigger a destroy
                                ; of selectize, which in turn will prevent
                                ; the dropdown_close event handlers from
                                ; complete correctly, so we schedule
                                ; updating the state for a later moment
                                js/window
                                (fn [] (if (seq value)
                                         ((:on-select-task for-state)
                                          (parse-selected-item value))
                                         ((:on-cancel for-state))))
                                0)))))))
    om/IRender
    (render [_]
      (let [options (:options for-state)
