Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Search bookmarks as soon as characters are typed
Browse files Browse the repository at this point in the history
Fixes #2778
  • Loading branch information
MKuenzi committed Sep 18, 2016
1 parent 5330ee7 commit 039aef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/about/bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,13 @@ class AboutBookmarks extends React.Component {
return title.match(new RegExp(searchTerm, 'gi'))
})
}
componentDidMount () {
this.refs.bookmarkSearch.focus()
}
render () {
return <div className='siteDetailsPage'>
<h2 data-l10n-id='folders' />
<input type='text' className='searchInput' id='bookmarkSearch' value={this.state.search} onChange={this.onChangeSearch} data-l10n-id='bookmarkSearch' />
<input type='text' className='searchInput' ref='bookmarkSearch' id='bookmarkSearch' value={this.state.search} onChange={this.onChangeSearch} data-l10n-id='bookmarkSearch' />
{
this.state.search
? <span onClick={this.onClearSearchText} className='fa fa-close searchInputClear' />
Expand Down

0 comments on commit 039aef0

Please sign in to comment.