@@ -2,6 +2,7 @@ import { Component } from "react";
22import { observer } from 'mobx-react'
33import subscribeToSearch from 'commons/Search/subscribeToSearch'
44import state from 'commons/Search/state'
5+ import cx from 'classnames'
56import { openFile } from 'commands/commandBindings/file'
67import * as delegate from 'commons/Search/action'
78import icons from 'file-icons-js'
@@ -31,7 +32,6 @@ export class SearchResultItem extends Component {
3132 openFile ( { path, editor : { filePath : path , selection } } )
3233 }
3334
34-
3535 render ( ) {
3636 const { fileName, pattern, path, results} = this . props ;
3737 const resultSize = results . length ;
@@ -40,7 +40,7 @@ export class SearchResultItem extends Component {
4040 < div className = 'search-item' key = { path } >
4141 < div className = 'search-item-path' onClick = { this . handlePathClick } >
4242 < i
43- className = { ( {
43+ className = { cx ( {
4444 'fa fa-caret-right' : this . state . isFolded ,
4545 'fa fa-caret-down' : ! this . state . isFolded
4646 } ) }
@@ -85,6 +85,9 @@ class SearchPanel extends Component {
8585 }
8686
8787 searchTxt = ( ) => {
88+ if ( state . searching . pattern . length == 0 || state . searching . pattern . trim ( ) == '' ) {
89+ return ;
90+ }
8891 if ( state . ws . first ) {
8992 state . ws . first = false
9093 }
@@ -148,7 +151,7 @@ class SearchPanel extends Component {
148151 placeholder = { i18n . get ( 'panel.left.find' ) }
149152 />
150153 </ div >
151- < div className = 'search-checkbox' >
154+ { /* <div className='search-checkbox'>
152155 <input
153156 title={i18n.get('panel.checkbox.case')}
154157 label={i18n.get('panel.checkbox.case')}
@@ -166,7 +169,7 @@ class SearchPanel extends Component {
166169 className='search-control-pattern'
167170 onChange={this.pattern}
168171 type='checkbox'/>
169- </ div >
172+ </div> */ }
170173 </ div >
171174 { this . renderResult ( ) }
172175 </ div >
0 commit comments