         false == this.xtraData(indx)?.selected
 
 class Lanes.Components.Grid.Selections
-    constructor: (options) ->
+
+    @setRow: (row, xd, selected) ->
+        xd.selected = selected
+
+    @isSelected: (row, xd, selected) ->
+        !(xd && false == xd.selected)
+
+
+    constructor: (options = {}) ->
         _.extend(@, DEFAULTS)
-        @onChange = options.onChange
+        _.extend(@, _.pick(options, 'onChange', 'attributesGetter'))
         @choices = {}
         _.bindAll(@, 'onColumnClick')
         @component = _.partial(@component, _, @)

    onColumnClick: (ev, props) ->
        unless ev.target.tagName is 'INPUT'
            input = ev.target.querySelector('input')
            xd = props.query.results.xtraData(props.rowNum)
            xd.selected = input.checked = !input.checked
        @onChange?(props)
        ev.stopPropagation()


class CheckBox extends Lanes.React.BaseComponent
    d: -> @props.query.results.xtraData(@props.row)

    onChange: (ev) ->
        @d().selected = ev.target.checked
        @props.selections.onChange?(@props)
        @forceUpdate()
