                event (aget grid handler-name)]]
      (.subscribe event handler-function))))
 
-(defn sg-init
+(defn sg-init [data form is-filtered-dataview?
+               & {:keys [page-count]}]
   "Creates a Slick.Grid backed by Slick.Data.DataView from data and fields.
    Most events are handled by slickgrid. On double-click, event is put on chan.
    Returns [grid dataview]."

        SlickGrid (.. js/Slick -Grid)
        DataView (.. js/Slick -Data -DataView)
        dataview (DataView.)
        grid (SlickGrid. (str "#" table-id) dataview columns sg-options)]
    ;; dataview / grid hookup
    (bind-external-slick-grid-event-handlers grid external-event-handlers)
    (.subscribe (.-onRowCountChanged dataview)

               (.resizeCanvas grid)
               (.invalidateAllRows grid)
               (.render grid)
               (init-sg-pager grid dataview :page-count total-page-count))))))))

;; OM COMPONENTS

