         search    : ''   # search that user has typed in so far
 
     clear_and_focus_input : ->
-        @setState(search : '', -> React.findDOMNode(@refs.search).focus())
-
-    render_search_button: ->
+        @setState(search : '')
+        #React.findDOMNode(@refs.search).focus()
+        # TODO: Using jquery -- this hack actually works, unlike the above -- maybe react-bootstrap needs a focus method...
+        $(React.findDOMNode(@refs.search)).find("input").focus()
+        @props.do_search('')
+
+    render_clear_button: ->
         <Button onClick={@clear_and_focus_input}>
             <Icon name="times-circle" />
         </Button>

        </div>

PAGE_SIZE = 10  # number of entries to show per page (TODO: move to account settings)

ProjectLog = rclass
    propTypes: ->

                    x.search = (users.get_name(x.account_id) + " " + (x.event?.filename ? "")).toLowerCase()
                    v.push(x)
            log = v
        words = misc.split(@state.search)
        if @state.search
            log = (x for x in log when matches(x.search, words))
        page = @state.page
        num_pages = Math.ceil(log.length / PAGE_SIZE)
        log = log.slice(PAGE_SIZE*page, PAGE_SIZE*(page+1))
