|
@@ -26,8 +26,13 @@ class CheckBody extends Component{
|
|
|
this.showHide = this.showHide.bind(this);
|
|
|
//this.handleInput = this.handleInput.bind(this);
|
|
|
}
|
|
|
- componentWillReceiveProps(nextProps){
|
|
|
- this.setState({boxLeft:nextProps.boxLeft})
|
|
|
+ componentWillReceiveProps(next){
|
|
|
+ if((this.props.defaultShowAll&&!next.defaultShowAll)||(!this.props.defaultShowAll&&next.defaultShowAll)||(!this.props.isEmpty&&next.isEmpty)){
|
|
|
+ this.setState({
|
|
|
+ showAll:next.defaultShowAll
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.setState({boxLeft:next.boxLeft})
|
|
|
}
|
|
|
getLabels(){
|
|
|
const {data,showArr,saveText,selecteds,importLabel} = this.props;
|
|
@@ -105,13 +110,6 @@ class CheckBody extends Component{
|
|
|
showAll:!this.state.showAll
|
|
|
});
|
|
|
}
|
|
|
- componentWillUpdate(next){
|
|
|
- if((this.props.defaultShowAll&&!next.defaultShowAll)||(!this.props.defaultShowAll&&next.defaultShowAll)||(!this.props.isEmpty&&next.isEmpty)){
|
|
|
- this.setState({
|
|
|
- showAll:next.defaultShowAll
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
render(){
|
|
|
const {searchData,totalHide,data,boxLeft,boxTop,saveText} = this.props;
|
|
|
|