                             :totalPages total-page-count})
     (.setFilter dataview (partial filterfn form))
     (.setItems dataview (clj->js data) _id)
-    (.registerPlugin grid (.AutoColumnSize js/Slick))
+    (resizeColumns grid)
     [grid dataview]))
 
 ;; EVENT LOOPS

           (go (<! (timeout 20))
               (.resizeCanvas grid)
               (.invalidateAllRows grid)
               (.render grid)
               (init-sg-pager grid dataview)
               (.registerPlugin grid (.AutoColumnSize js/Slick)))))))))

(defn- render-options
  [options owner colset!]
  (let [choose-display-key (fn [k] (om/set-state! owner :name-or-label k)
                             (colset! k)
                             (put! shared/event-chan {:re-render :table}))]
    (for [[k v] options]
      [:li [:a {:on-click (click-fn #(choose-display-key k)) :href "#"} v]])))


            grid
            (js/jQuery (str "#" pager-id)))))

(defn- resizeColumns [grid]
  (.registerPlugin grid (.AutoColumnSize js/Slick)))

(def sg-options
  "Options to feed the slickgrid constructor."
  #js {:autoHeight true
