   constructor: (props) ->
     super props
 
+    @debouncedSearch = _.debounce @search, 500
+
     prevState = JSON.parse(props.container.dataset.reactState ? '{}')
 
     @state = prevState.state unless _.isEmpty(prevState)

  search: =>
    @xhr?.abort()

    return Promise.resolve() if @isSupporterMissing()

    @setState loading: true


  componentDidMount: =>
    $(document).on 'beatmap:load_more.beatmaps', @loadMore
    $(document).on 'beatmap:search:start.beatmaps', @debouncedSearch
    $(document).on 'beatmap:search:filtered.beatmaps', @updateFilters
    $(document).on 'turbolinks:before-cache.beatmaps', @saveState
    $(window).on 'resize.beatmaps', @updateColumnCount
