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

Commit

Permalink
Merge pull request #4097 from MKuenzi/master
Browse files Browse the repository at this point in the history
Search bookmarks as soon as characters are typed
  • Loading branch information
bbondy authored Sep 19, 2016
2 parents 6655cc9 + 039aef0 commit 3fbf38d
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 3fbf38d

Please sign in to comment.