 
   renderNext: () ->
 
-module.exports = TermFacet+module.exports = TermFacet

      for term, selected of _this.selected
        if selected and not _this._termInResults(term, terms)
          _this.selected[term] = 0
          _this.controller.removeFilter _this.name, term 

  _termInResults: (term, terms) ->
    for elem in terms


    if res.results
      # To make access to selected easier
      # we add it to each term
      for term in res.facets[@name].terms
        if @selected[term.term]
          term.selected = 1
        else
          term.selected = 0

      context = $.extend true,
        total_selected: totalSelected
        name: @name
        terms: res.facets[@name].terms,
        @extraContext || {}

      html = @template(context)
