            ordered-data (if (= :desc (:sort-order @state)) (reverse sorted-data) sorted-data)]
        (take c (drop (* (dec n) c) ordered-data))))
    :filter-data
-   (fn [{:keys [props]} & [filter-text]]
+   (fn [{:keys []} & [props filter-text]]
      (if (empty? filter-text)
        (:data props)
        (filter

                       (case (:sort-order @state)
                         :asc (swap! state assoc :sort-order :desc)
                         :desc (swap! state dissoc :sort-column :sort-order :key-fn)
                         :else (assert false "bad state"))
                       (swap! state assoc :sort-column i :sort-order :asc
                         :key-fn (if (= :value sorter)
                                   (fn [row] (nth row i))

         (:data props))))
   :handle-pagination-change
   (fn [{:keys [this refs]}]
     (react/call :set-rows (@refs "body") (react/call :get-sliced-data this)))
   :component-will-receive-props
   (fn [{:keys [this state next-props refs]}]
     (swap! state assoc :filtered-data
       (react/call :filter-data this next-props (-> (@refs "filter-field") .getDOMNode .-value trim))))})
