   setSearch: (val) ->
     @props.setSearch(val)
 
-  handleKeyPress: (event) ->
+  handleSearchKeyPress: (event) ->
     if event.keyCode is 13 # Enter: commit search and close
       @setSearch(@state.searchVal)
       $("#searchDDToggle").dropdown("toggle")


  renderSearch: ->
    <div className="btn-group">
      <button id="searchDDToggle" type="button" className="btn btn-#{if @props.search is '' then 'default' else 'info'} btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        <span className="glyphicon glyphicon-search"></span> <span className="caret"></span>
      </button>
      <ul className="dropdown-menu">
        <li>
          <div className="input-group log-search">
            <input type="text" className="form-control" placeholder="Grep Logs" value={@state.searchVal} onChange={@handleSearchChange} onKeyDown={@handleKeyPress} />
            <span className="input-group-btn">
              <button className="btn btn-info no-margin" type="button" onClick={() => @setSearch(@state.searchVal)}><span className="glyphicon glyphicon-search"></span></button>
            </span>

        searchVal: ''
      @setSearch('')
      $("#searchDDToggle").dropdown("toggle")

  handleSearchToggle: (event) ->
    console.log 'tog'
    ReactDOM.findDOMNode(@refs.searchInput).focus()

  renderBreadcrumbs: ->
    segments = @props.path.split('/')
