                 requestsBody: templateBody
 
         $search = @$el.find('input[type="search"]')
-        searchWasFocused = $search.is(':focus')
 
         $requestsBodyContainer =  @$el.find('[data-requests-body-container]')
 

        @lastSearchFilter = _.trim @$el.find('input[type="search"]').val()
        app.router.navigate "/requests/#{ @lastRequestsFilter }/#{ requestsActiveFilter }/#{ @lastSearchFilter }", trigger: true

    setUpSearchEvents: (refresh, searchWasFocused) ->
        $search = @$el.find('input[type="search"]')

        if not app.isMobile and (not refresh or searchWasFocused)
            setTimeout -> $search.focus()

        $rows = @$('tbody > tr')

        previousLastSearchFilter = ''

        onChange = =>
            return unless @ is app.views.current

            @lastSearchFilter = _.trim $search.val()

        'click [data-action="starToggle"]': 'toggleStar'
        'click [data-action="run-now"]': 'runRequest'
        'click [data-requests-active-filter]': 'changeFilters'

        'change input[type="search"]': 'searchChange'
        'keyup input[type="search"]': 'searchChange'
        'input input[type="search"]': 'searchChange'

    initialize: ->
        @lastRequestsFilter = @options.requestsFilter
