     (reset! rows-cursor sorted-rows)))
 
 
+;;; -------------------------------------------
+;;; Фильтрование
 (defn filter-rows-numeric
+  "Отфильтровать строки по числу"
   [rows filter-cond field-name value]
   (filter #((case filter-cond ; получаем оператор сравнения
               :gt >


(rum/defc body-part-view < rum/reactive {:after-render (fn[state]
                                                         (notify-loaded)
                                                         state) }
  [columns rows-cursor selected-row-id-cursor]
  (println "body-part-view")
  (let [rows (rum/react rows-cursor)
        selected-row-id (rum/react selected-row-id-cursor)]
    [:div.table-body-div
     [:table {:cellSpacing 0}
      [:colgroup
       (map #(-> [:col {:style {:width (str (:width %) "%")}
                        :key (:index %)
                        }])
            columns)]
      [:tbody
       (map #(rum/with-key (row-view %
                                     columns
                                     (= selected-row-id (:id %)))
                           (:id %)) rows)]]]))


(rum/defc footer-part-view

;;      "zzz"]))



(rum/defc filter-checkbox-view < {:did-update (fn[state]
                                                (.checkbox (.find (dom/rcomp->js$ (:rum/react-component state))
                                                                  ".ui.checkbox"))
                                                state)}
  "Вьюшка для чекбокса из списка"
  [checkbox]
  [:div.item
   [:div.ui.checkbox
    {:class (if (:checked? checkbox) "checked" "")
     :on-click #(click-filter-checkbox checkbox)}
    [:input {:type "checkbox" :name (:id checkbox) :checked (:checked? checkbox)}]
    [:label (:name checkbox)]]])



(rum/defc select-all-checkbox-view < {:did-update (fn[state]
                                                    (let [$elem (dom/rcomp->js$ (:rum/react-component state))
                                                          s-all-ch (first (:rum/args state))]
                                                      (.checkbox $elem)
                                                      (if (:indeterminate? s-all-ch)
                                                        (.checkbox $elem "set indeterminate")
                                                        (.checkbox $elem "set determinate"))
                                                      state))}
  "Вьюшка для 'выбрать все' чекбокса"
  [select-all-checkbox]
  [:div.ui.master.checkbox
   {:class (if (:checked? select-all-checkbox) "checked" "")
    :on-click click-select-all-checkbox}
   [:input {:type "checkbox" :checked (:checked? select-all-checkbox)}]
   [:label (:name select-all-checkbox)]])



(rum/defc text-filter-popup-view  < rum/reactive {:after-render (fn[state]
                                                                   (.resizable (js/$ ".text-filter-window")
                                                                               (js-obj "minHeight" 200
                                                                                       "minWidth" 200))
                                                                  state)}
  "Вьюшка для фильтра с галочками"
  [show-cursor checkboxes-cursor select-all-checkbox-cursor]
;;   (println "show-cursor: " show-cursor)
  (let [show-text-filter? (rum/react show-cursor)
        checkboxes (rum/react checkboxes-cursor)
        select-all-checkbox (rum/react select-all-checkbox-cursor)]
    [:div.text-filter-window
     {:style {:visibility (if show-text-filter? "visible" "hidden")}}
     ;; список с чекбоксами
     [:div.item-list
      [:div.ui.list
       [:div.item
        ;; "выбрать все" чекбокс
        (select-all-checkbox-view select-all-checkbox)]]
      [:div.ui.divider]
      ;; остальные варианты
      [:div.ui.list.actual-items
       (map #(rum/with-key
               (filter-checkbox-view %) (:index %))
            checkboxes)
       ]]
     ;; кнопки
