File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,14 +39,19 @@ module.exports = React.createClass({
3939
4040 onSearchChange : function ( e ) {
4141 if ( e . keyCode === 13 ) { // on enter...
42- this . props . onSearch ( this . refs . search_term . value , this . state . scope ) ;
42+ this . onSearch ( ) ;
4343 }
4444 } ,
45+
46+ onSearch : function ( ) {
47+ this . props . onSearch ( this . refs . search_term . value , this . state . scope ) ;
48+ } ,
4549
4650 render : function ( ) {
4751 return (
4852 < div className = "mx_SearchBar" >
4953 < input ref = "search_term" className = "mx_SearchBar_input" type = "text" autoFocus = { true } placeholder = "Search..." onKeyDown = { this . onSearchChange } />
54+ < img className = "mx_SearchBar_searchButton" src = "img/search-button.svg" width = "37" height = "37" onClick = { this . onSearch } />
5055 < div className = { "mx_SearchBar_button" + ( this . state . scope !== 'Room' ? " mx_SearchBar_unselected" : "" ) } onClick = { this . onThisRoomClick } > This Room</ div >
5156 < div className = { "mx_SearchBar_button" + ( this . state . scope !== 'All' ? " mx_SearchBar_unselected" : "" ) } onClick = { this . onAllRoomsClick } > All Rooms</ div >
5257 < img className = "mx_SearchBar_cancel" src = "img/cancel.svg" width = "18" height = "18" onClick = { this . props . onCancelClick } />
Original file line number Diff line number Diff line change @@ -21,18 +21,22 @@ limitations under the License.
2121 align-items : center;
2222}
2323
24- . mx_SearchBar input {
24+ . mx_SearchBar_input {
2525 display : inline block;
2626 border-radius : 3px ;
2727 border : 1px solid # f0f0f0;
2828 font-size : 15px ;
2929 padding : 9px ;
3030 padding-left : 11px ;
31- margin-right : 17px ;
3231 width : auto;
3332 flex : 1 1 0 ;
3433}
3534
35+ . mx_SearchBar_searchButton {
36+ cursor : pointer;
37+ margin-right : 10px ;
38+ }
39+
3640. mx_SearchBar_button {
3741 display : inline;
3842 border : 0px ;
You can’t perform that action at this time.
0 commit comments