         @envs = options.envs
         @pkgs = options.pkgs
         @listenTo(@envs, 'all', () => @render())
-        @listenTo(@pkgs, 'reset', () => @render())
+        @listenTo(@pkgs, 'all', () => @render())
         @render()
 
     render: () ->

        @$el.html([$form_group, "&nbsp;", @$close])

    on_keyup: (event) =>
        @envs.set_filter(@$input.val())

    on_click: (event) =>
        @$input.val("")
        @envs.set_filter("")

    on_filter: (filter) =>
        if filter? and filter.length

    url: () -> "/api/pkgs"
    parse: (response) -> response.groups

    get_filter: () ->
        @_filter

    set_filter: (filter) ->
        @_filter = filter
        @trigger("filter", @_filter)

class PackagesView extends Backbone.View

    initialize: (options) ->
