     # XXX: how much of this could be split out so it's not re-defined every time render is called?
     feed.headers (headers) =>
       if options.showAdvancedSearch and options.advancedSearchEnabled
-        currentFilters = @advancedSearch() or [[]]
+        currentFilters = @advancedSearch() or []
         @_.advancedSearchView.apply currentFilters.filter((x) -> x.length).map (filterGroup) ->
           filterGroup.map (filterRow) ->
             hx.merge(filterRow, {

      .enter(advancedSearchGroupEnter(this))
      .update(advancedSearchGroupUpdate)

    addFilterGroup = ->
      prevFilters = dataTable.advancedSearch() or []
      dataTable.advancedSearch([prevFilters..., [{
        column: 'any',
        term: ''
      }]])

    clearFilters = => @advancedSearch([[]])

    advancedSearchButtons.append(hx.button({context: 'positive'})
      .add(hx.icon({class: 'hx-icon hx-icon-plus'}))
      .add(hx.detached('span').text(resolvedOptions.addFilterGroupText)))
      .on 'click', addFilterGroup

    advancedSearchButtons.append(hx.button({context: 'negative'})
      .add(hx.icon({class: 'hx-icon hx-icon-close'}))

    # Render individual row
    advancedSearchRowEnter = (filterGroup, filterGroupIndex, dataTable) ->
      (filterRow, index, trueIndex) ->
        typePickerOptions =
          items: [
            { text: hx.userFacingText('dataTable', 'and'), value: 'and' }
            { text: hx.userFacingText('dataTable', 'or'), value: 'or' }
          ]

        typePickerSel = hx.picker(typePickerOptions)
          .classed('hx-data-table-advanced-search-type', true)

        typePickerSel.component()
          .on 'change', (data) ->
            if data.cause is 'user'
              prevFilters = dataTable.advancedSearch()
              [leftFilterGroups, filterGroup, rightFilterGroups] = splitArray(prevFilters, filterGroupIndex)

              newFilters = if data.value.value is 'or'
                [leftFilters, filter, rightFilters] = splitArray(filterGroup, trueIndex)
                [leftFilterGroups..., leftFilters, [filter, rightFilters...], rightFilterGroups...]
              else
                [leftAllButLast..., leftLast] = leftFilterGroups
                [leftAllButLast..., [leftLast..., filterGroup...], rightFilterGroups...]

              dataTable.advancedSearch(newFilters)


        anyColumn = {
          text: resolvedOptions.anyColumnText
          value: 'any'
