   {:get-current-slice
    (fn [{:keys [state]}]
      [(:current-page @state) (:rows-per-page @state)])
+   :set-num-rows-visible
+   (fn [{:keys [state]} n]
+     (when (not= n (:num-rows-visible @state))
+       (swap! state assoc :num-rows-visible n :current-page 1)))
    :get-initial-state
-   (fn []
+   (fn [{:keys [props]}]
      {:rows-per-page initial-rows-per-page
-      :current-page 1})
+      :current-page 1
+      :num-rows-visible (:num-total-rows props)})
    :render
    (fn [{:keys [props state refs]}]
      (let [rows-per-page (:rows-per-page @state)
            current-page (:current-page @state)
-           num-rows-visible (:num-rows-visible props)
+           num-rows-visible (:num-rows-visible @state)
            num-pages (js/Math.ceil (/ num-rows-visible rows-per-page))
            allow-prev (> current-page 1)
            allow-next (< current-page num-pages)

               :style {:borderTop (when (= i (:drop-index @state)) "1px solid gray")}}])])})


(react/defc Table
  {:get-default-props
   (fn []

   :get-initial-state
   (fn [{:keys [props]}]
     {:ordered-columns (vec (map-indexed
                             (fn [index col]
                               (assoc col
                                      :index index :showing? true
                                      :width (or (:starting-width col) 100)
                                      :starting-width (or (:starting-width col) 100)))
                             (:columns props)))
      :dragging? false})
   :render
   (fn [{:keys [this state props refs]}]
     (let [paginator-above (= :above (:paginator props))
           paginator-below (= :below (:paginator props))
           paginator [Paginator {:ref "paginator"
                                 :num-total-rows (count (:data props))
                                 :onChange #(react/call :set-body-rows this)}]]
       [:div {}
        (when (or (:filterable? props) (:reorderable-columns? props))
          [:div {:style {:padding "0 0 1em 1em"}}
           (when (:filterable? props)
             [:div {:style {:float "left" :marginRight "1em"}}
              [Filterer {:ref "filterer" :onFilter #(react/call :set-body-rows this)}]])
           (when (:reorderable-columns? props)
             [:div {:style {:float "left"}}
              [comps/Button {:icon :gear :title-text "Select Columns..." :ref "col-edit-button"
