       @$.elems.func = @textarea "#search-func.u-full-width",
        value: '-> false'
        on: {change: @$.on.change}
+
+     @$.elems.btn = @button '.u-full-width.button-primary', 'Apply',
+      on: {click: @$.on.apply}
      @button '.u-full-width', on: {click: @$.on.cancel}, 'Cancel'
 
     @_setData() if @table?

     elems.remove._id = id
     @$.elems.inputs[id] = elems

   refresh: ->
    @search = {}
    n = 0
    for id, elems of @elems.inputs
     @search[id] = true
     n++
    @func = @elems.func.value
    try
     text = @func

    highlight = (true for i in [0...@table.size])
    for r in [0...@table.size]
     args = (@table.data[id][r] for id of @search)
     result = func.apply null, args
     if result? and result isnt false
      highlight[r] = true
     else
      highlight[r] = false
