|
@@ -55,7 +55,7 @@ class SearchDrop extends Component{
|
|
|
// onShow&&onShow(e,false);
|
|
|
}
|
|
|
render(){
|
|
|
- const {mainEmpty} = this.props;
|
|
|
+ const {mainEmpty,data} = this.props;
|
|
|
let litext = '';
|
|
|
const contStyle={
|
|
|
opacity:'0.4',
|
|
@@ -69,14 +69,14 @@ class SearchDrop extends Component{
|
|
|
return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
|
|
|
<ScrollArea speed={0.8}
|
|
|
horizontal={false}
|
|
|
- stopScrollPropagation={true}
|
|
|
+ stopScrollPropagation={data.length>6?true:false}
|
|
|
style={{maxHeight:'225px'}}
|
|
|
className={style["area"]}
|
|
|
verticalContainerStyle={contStyle}
|
|
|
verticalScrollbarStyle={barStyle}
|
|
|
contentClassName="content">
|
|
|
<ul>
|
|
|
- {this.props.data&&this.props.data.map((it)=>{
|
|
|
+ {data&&data.map((it)=>{
|
|
|
litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
|
|
|
return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
|
|
|
})}
|
|
@@ -88,14 +88,14 @@ class SearchDrop extends Component{
|
|
|
return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
|
|
|
<ScrollArea speed={0.8}
|
|
|
horizontal={false}
|
|
|
- stopScrollPropagation={true}
|
|
|
+ stopScrollPropagation={data.length>6?true:false}
|
|
|
style={{maxHeight:'225px'}}
|
|
|
className={style["area"]}
|
|
|
verticalContainerStyle={contStyle}
|
|
|
verticalScrollbarStyle={barStyle}
|
|
|
contentClassName="content">
|
|
|
<ul>
|
|
|
- {this.props.data&&this.props.data.map((it)=>{
|
|
|
+ {data&&data.map((it)=>{
|
|
|
litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
|
|
|
return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
|
|
|
})}
|