                     (put! shared/event-chan {:submission-to-rank rank}))))
 
     ;; page, filter, and data set-up on the dataview
-    (init-sg-pager grid dataview :page-count total-page-count)
+    (init-sg-pager grid dataview)
     (.setPagingOptions dataview
-                       #js {:pageSize (or num-displayed-records 25)})
+                       #js {:pageSize (or num-displayed-records 25)
+                            :totalPages total-page-count})
     (.setFilter dataview (partial filterfn form))
     (.setItems dataview (clj->js data) _id)
     [grid dataview]))

         :name label :toolTip label :sortable true
         :formatter (partial formatter field language)})))))

(defn- init-sg-pager [grid dataview & {:keys [page-count]}]
  (let [Pager (.. js/Slick -Controls -Pager)
        pager (Pager. dataview
                      grid
                      (js/jQuery (str "#" pager-id))
                      #js {:totalDisplayPages page-count})]
    pager))

(def sg-options
  "Options to feed the slickgrid constructor."

               (.resizeCanvas grid)
               (.invalidateAllRows grid)
               (.render grid)
               (init-sg-pager grid dataview))))))))

;; OM COMPONENTS

