                 ref         = "search"
                 placeholder = "Search log..."
                 onChange    = {(e) => e.preventDefault(); x=@refs.search.getValue(); @setState(search:x); @props.do_search(x)}
-                buttonAfter = {@render_search_button()}
+                buttonAfter = {@render_clear_button()}
                 />
         </form>
 

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

        </div>

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

matches = (s, words) ->
    for word in words
        if s.indexOf(word) == -1
            return false
    return true

ProjectLog = rclass
    propTypes: ->
