add close button to room search filter

This commit is contained in:
Matthew Hodgson 2016-05-16 23:36:52 +01:00
parent 8a9c85c97d
commit e640f65640
3 changed files with 38 additions and 0 deletions

View file

@ -81,6 +81,16 @@ module.exports = React.createClass({
var searchControls;
if (!this.props.collapsed) {
searchControls = [
this.state.searchTerm.length > 0 ?
<div key="button"
className="mx_SearchBox_closeButton"
onClick={ ()=>{ this.refs.search.value = ""; this.onChange(); } }>
<TintableSvg
className="mx_SearchBox_searchButton"
src="img/icons-close.svg" width="24" height="24"
/>
</div>
:
<TintableSvg
key="button"
className="mx_SearchBox_searchButton"